Bridging Learning
Bridging Learning
Published
2022-12-22
ii
Juniper Networks, the Juniper Networks logo, Juniper, and Junos are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. All other trademarks, service marks, registered marks, or registered service
marks are the property of their respective owners.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right
to change, modify, transfer, or otherwise revise this publication without notice.
The information in this document is current as of the date on the title page.
Juniper Networks hardware and software products are Year 2000 compliant. Junos OS has no known time-related
limitations through the year 2038. However, the NTP application is known to have some difficulty in the year 2036.
The Juniper Networks product that is the subject of this technical documentation consists of (or is intended for use
with) Juniper Networks software. Use of such software is subject to the terms and conditions of the End User License
Agreement ("EULA") posted at https://support.juniper.net/support/eula/. By downloading, installing or using such
software, you agree to the terms and conditions of that EULA.
iii
Table of Contents
About This Guide | viii
Layer 2 Bridging
Configuring VLAN Identifiers for Bridge Domains and VPLS Routing Instances | 11
Requirements | 18
Overview | 19
Configuration | 19
Verification | 23
Configuring the Size of the MAC Address Table for a Bridge Domain | 34
Requirements | 44
Overview | 45
Configuration | 45
Verification | 48
Understanding Layer 2 Learning and Forwarding for Bridge Domains Functioning as Switches with
Layer 2 Trunk Ports | 53
Configuring the Size of the MAC Address Table for a Set of Bridge Domains | 56
Configuring Integrated Routing and Bridging for a Bridge Domain in a Layer 2 Virtual Switch | 69
1 Configuration Statements
Configuration Statements for Layer 2 Bridge Domains | 76
action-priority | 77
bridge-domains | 78
bridge-options | 80
disable-action | 82
enable-mac-move-action | 85
interface | 86
interface-mac-limit | 88
mac-statistics | 91
mac-table-size | 93
mac-table-aging-time | 95
no-irb-layer-2-copy | 97
no-mac-learning | 98
packet-action | 102
reopen-time | 106
routing-interface | 107
service-id | 109
static-mac | 111
vlan-id-list | 113
vlan-tags | 115
switch-options | 118
interface-mac-limit | 120
vi
mac-statistics | 123
mac-table-size | 125
no-mac-learning | 128
packet-action | 131
mac-learning-priority | 136
l2-learning | 138
global-mac-limit | 140
global-mac-move | 142
global-mac-statistics | 143
global-mac-table-aging-time | 145
global-no-mac-learning | 147
interface-mac-limit | 148
notification-time | 151
packet-action | 152
threshold-count | 156
threshold-time | 158
2 Operational Commands
Operational Mode Commands for Layer 2 Learning | 161
Use this guide to configure, monitor, and troubleshoot Layer 2 bridging, address learning, and forwarding
features on your Juniper Network devices.
1 CHAPTER
Layer 2 Bridging
You can configure one or more bridge domains on MX Series routers to perform Layer 2 bridging. The
Layer 2 bridging functions of the MX Series routers include integrated routing and bridging (IRB) for
support for Layer 2 bridging and Layer 3 IP routing on the same interface, and virtual switches that
isolate a LAN segment with its spanning-tree protocol instance and separate its VLAN ID space.
A bridge domain is a set of logical ports that share the same flooding or broadcast characteristics. Like a
virtual LAN (VLAN), a bridge domain spans one or more ports of multiple devices.
On Juniper Networks MX Series 5G Universal Routing Platforms only, you can configure one or more
bridge domains to perform Layer 2 bridging. Thus, MX Series routers can function as Layer 2 switches,
each with multiple bridging, or broadcast, domains that participate in the same Layer 2 network. You can
also configure Layer 3 routing support for a bridge domain. Integrated routing and bridging (IRB)
provides support for Layer 2 bridging and Layer 3 IP routing on the same interface. IRB enables you to
route packets to another routed interface or to another bridge domain that has a Layer 3 protocol
configured.
You can also group one or more bridge domains within a single instance, or virtual switch. The MX Series
routers also support multiple virtual switches, each of which operates independently of other virtual
switches on the router. Virtual switches isolate a LAN segment with its spanning-tree protocol
instance. . Thus, each virtual switch can participate in a different Layer 2 network.
In Junos OS Release 9.2 and later, bridge domains provide support for a Layer 2 trunk port. A Layer 2
trunk interface enables you to configure a single logical interface to represent multiple VLANs on a
physical interface. You can configure a set of bridge domains and VLAN identifiers that are automatically
associated with one or more Layer 2 trunk interfaces. Packets received on a trunk interface are
forwarded within a bridge domain that has the same VLAN identifier. A Layer 2 trunk interface also
3
supports IRB within a bridge domain. In addition, you can configure Layer 2 learning and forwarding
properties that apply to the entire set of bridge domains.
In Junos OS Release 9.3 and later, you can configure VPLS ports in a virtual switch instead of a
dedicated routing instance of type vpls so that the logical interfaces of the Layer 2 bridge domains in the
virtual switch can handle VPLS routing instance traffic. Packets received on a Layer 2 trunk interface are
forwarded within a bridge domain that has the same VLAN identifier.
A bridge domain is a set of logical interfaces that share the same flooding or broadcast characteristics.
Layer 2 logical interfaces are created by defining one or more logical units on a physical interface with
encapsulation as ethernet-bridge or vlan-bridge. All the member ports of the bridge domain participate in
Layer 2 learning and forwarding. You can configure one or more bridge domains on ACX Series routers
to perform Layer 2 bridging. The Layer 2 bridging functions of ACX Series routers include integrated
routing and bridging (IRB) support for Layer 2 bridging and Layer 3 IP routing on the same interface. IRB
enables you to route packets to another routed interface or to another bridge domain that has a Layer 3
protocol configured
NOTE: ACX Series routers do not support the creation of bridge domains by using access and
trunk ports.
You can configure E-LAN and E-LINE services by using bridge domains.
On ACX Series routers, you can configure bridge domains by using the following methods:
NOTE: The Layer 2 CLI configurations and show commands for ACX5048 and ACX5096 routers
differ compared to other ACX Series routers. For more information, see Layer 2 Next Generation
Mode for ACX Series.
4
When you configure E-LAN and E-LINE services using a bridge domain without a vlan-id number
statement, the bridge domain should explicitly be normalized to a service VLAN ID and TPID by
configuring an input VLAN map under a logical interface. Explicit normalization is required when a
logical interface’s outer VLAN ID and TPID is not the same as the service VLAN ID and TPID of the
service being configured using a bridge domain.
The following input VLAN map functions are supported in ACX Series routers:
• pop—Remove a VLAN tag from the top of the VLAN tag stack.
• swap-swap—Replace both the outer and inner VLAN tags of the frame.
NOTE: push-push does not work on ACX Series routers if the incoming packet already has a
VLAN tag.
The following VLAN map functions are not supported in ACX Series routers:
• swap-push—Replace the outer VLAN tag of the frame and add a new VLAN tag to the top of the VLAN
stack.
• pop-swap—Remove the outer VLAN tag of the frame and replace the inner VLAN tag of the frame.
• pop-pop—Remove both the outer and inner VLAN tags of the frame.
NOTE: You can configure Q-in-Q tunneling by explicitly configuring an input VLAN map with the
push function on the ingress logical interface.
A bridge domain can also be created by using aggregated Ethernet interfaces. Aggregated Ethernet
interfaces are considered as logical interfaces in a bridge domain.
The following steps outline the process for bridging a packet received over a Layer 2 logical interface:
1. When a packet is received on a physical port, it is accepted only if the VLAN identifier of the packet
matches the VLAN identifier of one of the logical interfaces configured on that port.
2. If the bridge domain is configured without a vlan-id number statement, then the VLAN tags are
rewritten based on the input VLAN map configured on the logical interface and normalized to a
service VLAN ID.
5
3. If the bridge domain is configured with a normalizing VLAN identifier by using the vlan-id number
statement, the VLAN tags of the received packet are compared with the normalizing VLAN identifier.
If the VLAN tags of the packet are different from the normalizing VLAN identifier, the VLAN tags are
rewritten as described in Table 1 on page 5.
4. If the source MAC address of the received packet is not present in the source MAC table, it is learned
based on the normalizing VLAN identifier.
5. The packet is then forwarded toward one or more outbound Layer 2 logical interfaces based on the
destination MAC address. A packet with a known unicast destination MAC address is forwarded only
to one outbound logical interface.
6. If the bridge domain is configured without a vlan-id number statement, then for each outbound Layer 2
logical interface, the VLAN tags are rewritten based on the output VLAN map configured on that
logical interface.
7. If the bridge domain is configured with a normalizing VLAN identifier by using the vlan-id number
statement, for each outbound Layer 2 logical interface, the normalizing VLAN identifier configured
for the bridge domain is compared with the VLAN tags configured on that logical interface. If the
VLAN tags associated with an outbound logical interface do not match the normalizing VLAN
identifier configured for the bridge domain, the VLAN tags are rewritten as described in Table 2 on
page 6.
Table 1 on page 5 shows specific examples of how the VLAN tags of packets sent to the bridge
domain are processed and translated, depending on your configuration. “–” means that the statement is
not supported for the specified logical interface VLAN identifier. “No operation” means that the VLAN
tags of the received packet are not translated for the specified input logical interface.
Table 1: Statement Usage and Input Rewrite Operations for VLAN Identifiers for a Bridge Domain
Table 1: Statement Usage and Input Rewrite Operations for VLAN Identifiers for a Bridge Domain
(Continued)
vlan-tags outer 2000 inner 300 pop 2000, pop 300 pop 2000, swap 300
to 200
vlan-tags outer 100 inner 400 pop 100, pop 400 pop 100, swap 400
to 200
vlan-id-range 10-100 – –
Table 2 on page 6 shows specific examples of how the VLAN tags for packets sent from the bridge
domain are processed and translated, depending on your configuration. “–” means that the statement is
not supported for the specified logical interface VLAN identifier. “No operation” means that the VLAN
tags of the outbound packet are not translated for the specified output logical interface.
Table 2: Statement Usage and Output Rewrite Operations for VLAN Identifiers for a Bridge Domain
vlan-tags outer 2000 inner 300 push 2000, push 300 swap 200 to 300,
push 2000
vlan-tags outer 100 inner 400 push 100, push 400 swap 200 to 400,
push 100
7
Table 2: Statement Usage and Output Rewrite Operations for VLAN Identifiers for a Bridge Domain
(Continued)
vlan-id-range 10-100 – –
Limitations on Layer 2 bridging—The following Layer 2 bridging limitations apply for ACX Series
Universal Metro Routers:
• A bridge domain cannot have two or more logical interfaces that belong to the same physical
interface.
• The maximum number of supported input VLAN maps with TPID swap is 64.
A bridge domain must include a set of logical interfaces that participate in Layer 2 learning and
forwarding. You can optionally configure a VLAN identifier and a routing interface for the bridge domain
to also support Layer 3 IP routing.
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge:
interface interface-name;
routing-interface routing-interface-name;
vlan-id (none | all | number);
vlan-id-list [ vlan-id-numbers ];
vlan-tags outer number inner number);
}
}
NOTE: The Layer 2 CLI configurations and show commands for ACX5048 and ACX5096 routers
differ compared to other ACX Series routers. For more information, see Layer 2 Next Generation
Mode for ACX Series.
You cannot use the slash (/) character in bridge domain names. If you do, the configuration does not
commit and an error is generated.
For the vlan-id statement, you can specify either a valid VLAN identifier or the none or all options. For
information about VLAN identifiers and VLAN tags for a bridge domain, see Configuring VLAN
Identifiers for Bridge Domains and VPLS Routing Instances.
To include one or more logical interfaces in the bridge domain, specify an interface-name for an Ethernet
interface you configured at the [edit interfaces] hierarchy level.
NOTE: A maximum of 4000 active logical interfaces are supported on a bridge domain or on
each mesh group in a virtual private LAN service (VPLS) instance configured for Layer 2 bridging.
9
To configure a layer 2 logical interface to be included in a bridge domain, you can either include the
encapsulation vlan-bridge statement under the logical interface, or the encapsulation ethernet-bridge
statement under the physical interface.
NOTE: On ACX Series routers, a maximum of 1000 logical interfaces can be configured on a
physical interface. You can configure a maximum of 3000 bridge domains on an ACX Series
router.
By default, each bridge domain maintains a Layer 2 forwarding database that contains media access
control (MAC) addresses learned from packets received on the ports that belong to the bridge domain.
You can modify Layer 2 forwarding properties, including disabling MAC learning for the entire system or
a bridge domain, adding static MAC addresses for specific logical interfaces, and limiting the number of
MAC addresses learned by the entire system, the bridge domain, or a logical interface.
You can also configure spanning tree protocols to prevent forwarding loops. .
In Junos OS Release 8.5 and later, you can configure IGMP snooping for a bridge domain. For more
information, see the Junos OS Multicast Protocols User Guide.
Integrated routing and bridging (IRB) provides simultaneous support for Layer 2 bridging and Layer 3
routing on the same interface. IRB enables you to route packets to another routed interface or to
another bridge domain that has an IRB interface configured. You configure a logical routing interface by
including the irb statement at the [edit interfaces] hierarchy level and include that interface in the bridge
domain. For more information about how to configure a routing interface, see the Junos OS Network
Interfaces Library for Routing Devices.
NOTE: You can include only one routing interface in a bridge domain.
To configure a bridge domain with IRB support, include the following statements:
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
routing-interface routing-interface-name;
service-id number;
vlan-id (none | number);
vlan-tags outer number inner number;
10
}
}
For each bridge domain that you configure, specify a bridge-domain-name. You must also specify the
value bridge for the domain-type statement.
For the vlan-id statement, you can specify either a valid VLAN identifier or the none option.
NOTE: If you configure a routing interface to support IRB in a bridge domain, you cannot use the
all option for the vlan-id statement.
The vlan-tags statement enables you to specify a pair of VLAN identifiers; an outer tag and an inner tag.
NOTE: For a single bridge domain, you can include either the vlan-id statement or the vlan-tags
statement, but not both.
For MC-LAG bridge domains, when the VLAN identifier is none, use the service-id statement to facilitate
media access control (MAC) and Address Resolution Protocol (ARP) synchronization among MC-LAG
peers.
To include one or more logical interfaces in the bridge domain, specify the interface name for each
Ethernet interface to include that you configured at the [edit interfaces] hierarchy level.
NOTE: A maximum of 4000 active logical interfaces are supported on a bridge domain or on
each mesh group in a VPLS routing instance configured for Layer 2 bridging.
To associate a routing interface with a bridge domain, include the routing-interface routing-interface-name
statement and specify a routing-interface-name you configured at the [edit interfaces irb] hierarchy
level. You can configure only one routing interface for each bridge domain. For more information about
how to configure logical and routing interfaces, see the Junos OS Network Interfaces Library for Routing
Devices.
In Junos OS Release 9.0 and later, IRB interfaces are supported for multicast snooping. For more
information about multicast snooping, see the Understanding Multicast Snooping and VPLS Root
Protection.
In Junos 11.4 and later, IP multicast is supported on Layer 2 trunk ports through IRB interfaces using the
Trio chipset.
11
In Junos OS Release 9.6 and later, in multihomed VPLS configurations, you can configure VPLS to keep a
VPLS connection up if only an IRB interface is available by configuring the irb option for the connectivity-
type statement at the [edit routing-instances routing-instance-name protocols vpls] hierarchy level. The
connectivity-type statement has two options, ce and irb. The ce option is the default and specifies that a
CE interface is required to maintain the VPLS connection. By default, if only an IRB interface is available,
the VPLS connection is brought down. For more information about configuring VPNs, see the Junos
VPN Configuration Guide.
NOTE: When you configure IRB interfaces in more than one logical system on a device, all of the
of the IRB logical interfaces share the same MAC address.
Integrated Bridging and Routing (IRB) interfaces are used to tie together Layer 2 switched and Layer 3
routed domains on MX routers. MX routers support classifiers and rewrite rules on the IRB interface at
the [edit class-of-service interfaces irb unit logical-unit-number] level of the hierarchy. All types of
classifiers and rewrite rules are allowed, including IEEE 802.1p.
NOTE: The IRB classifiers and rewrite rules are used only for routed packets; in other words, it is
for traffic that originated in the Layer 2 domain and is then routed through IRB into the Layer 3
domain, or vice versa. Only IEEE classifiers and IEEE rewrite rules are allowed for pure Layer 2
interfaces within a bridge domain.
For a bridge domain that is performing Layer 2 switching only, you do not have to specify a VLAN
identifier.
For a bridge domain that is performing Layer 3 IP routing, you must specify either a VLAN identifier or
dual VLAN identifier tags.
For a VPLS routing instance, you must specify either a VLAN identifier or dual VLAN identifier tags.
You can configure VLAN identifiers for a bridge domain or a VPLS routing instance in the following
ways:
• By using the input-vlan-map and the output-vlan-map statements at the [edit interfaces interface-name]
or [edit logical-systems logical-system-name interfaces interface-name] hierarchy level to configure VLAN
mapping. For information about configuring input and output VLAN maps to stack and rewrite VLAN
12
tags in incoming or outgoing frames, see the Junos OS Network Interfaces Library for Routing
Devices.
• By using either the vlan-id statement or the vlan-tags statement to configure a normalizing VLAN
identifier. This topic describes how normalizing VLAN identifiers are processed and translated in a
bridge domain or a VPLS routing instance.
The vlan-id and vlan-tags statements are used to specify the normalizing VLAN identifier under the
bridge domain or VPLS routing instance. The normalizing VLAN identifier is used to perform the
following functions:
• Translate, or normalize, the VLAN tags of received packets received into a learn VLAN identifier.
• Create multiple learning domains that each contain a learn VLAN identifier. A learning domain is a
MAC address database to which MAC addresses are added based on the learn VLAN identifier.
NOTE: You cannot configure VLAN mapping using the input-vlan-map and output-vlan-map
statements if you configure a normalizing VLAN identifier for a bridge domain or VPLS routing
instance using the vlan-id or vlan-tags statements.
To configure a VLAN identifier for a bridge domain, include either the vlan-id or the vlan-tags statement
at the [edit interfaces interface-name unit logic-unit-number family bridge] or [edit logical-systems logical-
system-name interfaces interface-name unit logic-unit-number family bridge] hierarchy level, and then include
that logical interface in the bridge domain configuration. For more information about configuring a
bridge domain, see Configuring a Bridge Domain.
For a VPLS routing instance, include either the vlan-id or vlan-tags statement at the [edit interfaces
interface-name unit logic-unit-number] or [edit logical-systems logical-system-name interfaces interface-name unit
logic-unit-number] hierarchy level, and then include that logical interface in the VPLS routing instance
configuration. For more information about configuring a VPLS routing instance, see the Junos OS VPNs
Library for Routing Devices.
NOTE: The maximum number of Layer 2 interfaces that you can associate with a bridge domain
or a VPLS instance on MX Series routers is 4000.
NOTE: For a single bridge domain or VPLS routing instance, you can include either the vlan-id or
the vlan-tags statement, but not both. If you do not configure a vlan-id, vlan-tags, or vlan-id-list
[ vlan-id-numbers ] for the bridge domain or the VPLS routing instance, the Layer 2 packets
received are forwarded to the outbound Layer 2 interface without having the VLAN tag modified
13
unless an output-vlan-map is configured on the Layer 2 interface. This results in a frame being
forwarded to a Layer 2 interface with a VLAN tag that is different from what is configured for the
Layer 2 interface. Note that a frame received from the Layer 2 interface is still required to match
the VLAN tag(s) specified in the interface configuration. The invalid configuration may cause a
Layer 2 loop to occur.
The VLAN tags associated with the inbound logical interface are compared with the normalizing VLAN
identifier. If the tags are different, they are rewritten as described in Table 3 on page 16. The source
MAC address of a received packet is learned based on the normalizing VLAN identifier.
NOTE: You do not have to specify a VLAN identifier for a bridge domain that is performing
Layer 2 switching only. To support Layer 3 IP routing, you must specify either a VLAN identifier
or a pair of VLAN tags. However, you cannot specify the same VLAN identifier for more than one
bridge domain within a routing instance. Each bridge domain must have a unique VLAN
identifier.
If the VLAN tags associated with the outbound logical interface and the normalizing VLAN identifier are
different, the normalizing VLAN identifier is rewritten to match the VLAN tags of the outbound logical
interface, as described in Table 4 on page 17.
For the packets sent over the VPLS routing instance to be tagged by the normalizing VLAN identifier,
include one of the following configuration statements:
• vlan-id number to tag all packets that are sent over the VPLS virtual tunnel (VT) interfaces with the
VLAN identifier.
• vlan-tags outer number inner number to tag all packets sent over the VPLS VT interfaces with dual
outer and inner VLAN tags.
Use the vlan-id none statement to have the VLAN tags removed from packets associated with an inbound
logical interface when those packets are sent over VPLS VT interfaces. Note that those packets might
still be sent with other customer VLAN tags.
The vlan-id all statement enables you to configure bridging for several VLANs with a minimum amount
of configuration. Configuring this statement creates a learning domain for:
• Each inner VLAN, or learn VLAN, identifier of a logical interface configured with two VLAN tags
• Each VLAN, or learn VLAN, identifier of a logical interface configured with one VLAN tag
We recommend that you do not use customer VLAN IDs in a VPLS routing instance because customer
VLAN IDs are used for learning only.
14
You should use the service VLAN ID in a VPLS routing instance, as in the following configuration:
[edit]
interface ge-1/1/1 {
vlan-tagging;
unit 1 {
vlan-id s1; /* Service vlan */
encapsulation vlan-vpls;
input-vlan-map pop; /* Pop the service vlan on input */
output-vlan-map push; /* Push the service vlan on output */
}
}
interface ge-1/1/2 {
encapsulation ethernet-vpls;
unit 0;
}
routing-instance {
V1 {
instance-type vpls;
vlan-id all;
interface ge-1/1/1.1;
interface ge-1/1/2.0;
}
}
NOTE: If you configure the vlan-id all statement in a VPLS routing instance, we recommend
using the input-vlan-map pop and output-vlan-map push statements on the logical interface to pop
the service VLAN ID on input and push the service VLAN ID on output and in this way limit the
impact of doubly-tagged frames on scaling. You cannot use the native vlan- id statement when
the vlan-id all statement is included in the configuration.
The vlan-id-list [ vlan-id-numbers ] statement enables you to configure bridging for multiple VLANs on a
trunk interface. Configuring this statement creates a learning domain for:
• Each VLAN in a list and range combination: vlan-id-list [ 50, 100-200, 300 ]
15
The following steps outline the process for bridging a packet received over a Layer 2 logical interface
when you specify a normalizing VLAN identifier using either the vlan-id number or vlan-tags statement
for a bridge domain or a VPLS routing instance:
1. When a packet is received on a physical port, it is accepted only if the VLAN identifier of the packet
matches the VLAN identifier of one of the logical interfaces configured on that port.
2. The VLAN tags of the received packet are then compared with the normalizing VLAN identifier. If the
VLAN tags of the packet are different from the normalizing VLAN identifier, the VLAN tags are
rewritten as described in Table 3 on page 16.
3. If the source MAC address of the received packet is not present in the source MAC table, it is learned
based on the normalizing VLAN identifier.
4. The packet is then forwarded toward one or more outbound Layer 2 logical interfaces based on the
destination MAC address. A packet with a known unicast destination MAC address is forwarded only
to one outbound logical interface. For each outbound Layer 2 logical interface, the normalizing VLAN
identifier configured for the bridge domain or VPLS routing instance is compared with the VLAN tags
configured on that logical interface. If the VLAN tags associated with an outbound logical interface
do not match the normalizing VLAN identifier configured for the bridge domain or VPLS routing
instance, the VLAN tags are rewritten as described in Table 4 on page 17.
The tables below show how VLAN tags are applied for traffic sent to and from the bridge domain,
depending on how the vlan-id and vlan-tags statements are configured for the bridge domain and on how
VLAN identifiers are configured for the logical interfaces in a bridge domain or VPLS routing instance.
Depending on your configuration, the following rewrite operations are performed on VLAN tags:
• pop—Remove a VLAN tag from the top of the VLAN tag stack.
• pop-pop—Remove both the outer and inner VLAN tags of the frame.
• pop-swap—Remove the outer VLAN tag of the frame and replace the inner VLAN tag of the frame.
• swap-push—Replace the VLAN tag of the frame and add a new VLAN tag to the top of the VLAN
stack.
• swap-swap—Replace both the outer and inner VLAN tags of the frame.
Table 3 on page 16 shows specific examples of how the VLAN tags for packets sent to the bridge
domain are processed and translated, depending on your configuration. “–” means that the statement is
not supported for the specified logical interface VLAN identifier. “No operation” means that the VLAN
tags of the received packet are not translated for the specified input logical interface.
16
Table 3: Statement Usage and Input Rewrite Operations for VLAN Identifiers for a Bridge Domain
vlan-id none vlan-id 200 vlan-id all vlan tags outer 100
inner 300
1000 pop 1000 swap 1000 to 200 No operation swap 1000 to 300,
push 100
vlan-tags outer pop 2000, pop 300 pop 2000, swap pop 2000 swap 2000 to 100
2000 inner 300 300
to 200
vlan-tags outer 100 pop 100, pop 400 pop 100, swap 400 pop 100 swap 400 to 300
inner 400 to 200
vlan-id-range – – No operation –
10-100
Table 4 on page 17 shows specific examples of how the VLAN tags for packets sent from the bridge
domain are processed and translated, depending on your configuration. “–” means that the statement is
not supported for the specified logical interface VLAN identifier. “No operation” means that the VLAN
tags of the outbound packet are not translated for the specified output logical interface.
17
Table 4: Statement Usage and Output Rewrite Operations for VLAN Identifiers for a Bridge Domain
vlan-id none vlan-id 200 vlan-id all vlan tags outer 100
inner 300
1000 push 1000 swap 200 to 1000 No operation pop 100, swap 300
to 1000
vlan-tags outer push 2000, push swap 200 to 300, push 2000 swap 100 to 2000
2000 inner 300 300 push 2000
vlan-tags outer 100 push 100, push 400 swap 200 to 400, push 100 swap 300 to 400
inner 400 push 100
vlan-id-range – – No operation –
10-100
You can configure VLAN identifiers for a bridge domain for normalization in the following ways:
• Configure VLAN mapping by using the input-vlan-map and the output-vlan-map statements at the [edit
interfaces interface-name] hierarchy level.
• Configure an implicit normalizing VLAN identifier under the bridge domain by using the vlan-id
statement at the [edit bridge-domains bridge-domain-name] hierarchy level.
18
NOTE: You cannot configure VLAN mapping by using the input-vlan-map and output-vlan-map
statements if you configure a normalizing VLAN identifier for a bridge domain by using the vlan-
id statement.
You can use the vlan-id-list [ vlan-id-numbers ] statement to configure bridging for multiple VLANs.
Configuring this statement creates a bridge domain for:
• Each VLAN in a list and range combination—for example, vlan-id-list [ 50, 100-200, 300 ]
IN THIS SECTION
Requirements | 18
Overview | 19
Configuration | 19
Verification | 23
This example shows how to configure Layer 2 switching with all interfaces participating in a single
VLAN.
Requirements
No special configuration beyond device initialization is required before configuring this example.
Overview
IN THIS SECTION
Topology | 19
In this example, a single MX Series device is configured to act as a basic single-VLAN switch. Three
connections are in place. The connections from the MX Series device attach to Junos OS routers, but
the routers are used here for testing purposes only. In place of routers, you can use any IP networking
devices.
Topology
"CLI Quick Configuration" on page 20 shows the configuration for all of the devices in Figure 1 on page
19.
Configuration
IN THIS SECTION
Procedure | 21
To quickly configure this example, copy the following commands, paste them into a text file, remove any
line breaks, change any details necessary to match your network configuration, and then copy and paste
the commands into the CLI at the [edit] hierarchy level.
Device S1
Device R1
Device R2
Device R3
Procedure
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For
information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS
CLI User Guide.
[edit interfaces]
user@S1# set interfaces ge-2/0/0 vlan-tagging
user@S1# set interfaces ge-2/0/0 encapsulation extended-vlan-bridge
user@S1# set interfaces ge-2/0/0 unit 0 vlan-id 600
user@S1# set interfaces ge-2/0/1 vlan-tagging
user@S1# set interfaces ge-2/0/1 encapsulation extended-vlan-bridge
user@S1# set interfaces ge-2/0/1 unit 0 vlan-id 600
user@S1# set interfaces ge-2/0/2 vlan-tagging
user@S1# set interfaces ge-2/0/2 encapsulation extended-vlan-bridge
user@S1# set interfaces ge-2/0/2 unit 0 vlan-id 600
[edit interfaces]
user@S1# set bridge-domains customer1 domain-type bridge
user@S1# set bridge-domains customer1 interface ge-2/0/0.0
user@S1# set bridge-domains customer1 interface ge-2/0/2.0
user@S1# set bridge-domains customer1 interface ge-2/0/1.0
22
Results
From configuration mode, confirm your configuration by entering the show interfaces and show bridge-
domains commands. If the output does not display the intended configuration, repeat the instructions in
this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
23
Verification
IN THIS SECTION
Making Sure That the Attached Devices Can Reach Each Other | 24
Purpose
Action
MAC flags (S -static MAC, D -dynamic MAC, L -locally learned, C -Control MAC
SE -Statistics enabled, NM -Non configured MAC, R -Remote PE MAC)
• From Device S1, run the show bridge mac-table extensive command.
Meaning
The output shows that the MAC addresses have been learned.
Making Sure That the Attached Devices Can Reach Each Other
Purpose
Verify connectivity.
25
Action
Meaning
The output shows that the attached devices have established Layer 3 connectivity, with Device S1 doing
transparent Layer 2 bridging.
26
Purpose
Action
Meaning
Purpose
Action
Flooded bytes : 0
Unicast packets : 1
Unicast bytes : 64
Current MAC count: 1 (Limit 1024)
Local interface: ge-2/0/2.0, Index: 324
Broadcast packets: 0
Broadcast bytes : 0
Multicast packets: 80
Multicast bytes : 8160
Flooded packets : 1
Flooded bytes : 74
Unicast packets : 52
Unicast bytes : 4332
Current MAC count: 1 (Limit 1024)
Local interface: ge-2/0/1.0, Index: 196613
Broadcast packets: 2
Broadcast bytes : 128
Multicast packets: 0
Multicast bytes : 0
Flooded packets : 1
Flooded bytes : 93
Unicast packets : 51
Unicast bytes : 4249
Current MAC count: 1 (Limit 1024)
Meaning
The output shows that bridge domain interfaces are sending and receiving packets.
Purpose
Action
Name: __juniper_private1__
CEs: 0
28
VEs: 0
Name: default-switch
CEs: 3
VEs: 0
Bridging domain: customer1
Flood route prefix: 0x30003/51
Flood route type: FLOOD_GRP_COMP_NH
Flood route owner: __all_ces__
Flood group name: __all_ces__
Flood group index: 1
Nexthop type: comp
Nexthop index: 568
Flooding to:
Name Type NhType Index
__all_ces__ Group comp 562
Composition: split-horizon
Flooding to:
Name Type NhType Index
ge-2/0/0.0 CE ucst 524
ge-2/0/1.0 CE ucst 513
ge-2/0/2.0 CE ucst 523
Meaning
If the destination MAC address of a packet is unknown to the device (that is, the destination MAC
address in the packet does not have an entry in the forwarding table), the device duplicates the packet
and floods it on all interfaces in the bridge domain other than the interface on which the packet arrived.
This is known as packet flooding and is the default behavior for the device to determine the outgoing
interface for an unknown destination MAC address.
Purpose
Action
On MX Series routers only, you can configure Layer 2 MAC address and VLAN learning and forwarding
properties in support of Layer 2 bridging. The router learns unicast media access control (MAC)
addresses to avoid flooding the packets to all the ports in a bridge domain. The MX Series router creates
a source MAC entry in its source and destination MAC tables for each MAC address learned from
packets received on ports that belong to the bridge domain. If the bridge domain receives a control
protocol data unit (PDU) which does not have a corresponding protocol configured, then the control
PDU is considered as an unknown multicast data packet and the packets are flooded across all the ports
that are part of the same bridge domain. If the bridge domain has the protocol corresponding to the
PDU configured , then the control PDU is considered as a control packet and is processed by the routing
engine.
By default, Layer 2 address learning is enabled. You can disable MAC learning for the router or for a
specific bridge domain or logical interfaces. You can also configure the following Layer 2 forwarding
properties for an MX Series router:
• MAC accounting
• A limit to the number of MAC addresses learned from the logical interfaces
32
When you configure a bridge domain, Layer 2 address learning is enabled by default. The bridge domain
learns unicast media access control (MAC) addresses to avoid flooding the packets to all the ports in the
bridge domain. Each bridge domain creates a source MAC entry in its source and destination MAC
tables for each source MAC address learned from packets received on the ports that belong to the
bridge domain.
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 MAC learning either for the entire router or for a specific bridge domain or
logical interface. You can also configure the following Layer 2 learning and forwarding properties:
• Limit to the number of MAC addresses learned from a specific logical interface or from all the logical
interfaces in a bridge domain
You can manually add static MAC entries for the logical interfaces in a bridge domain. You can specify
one or more static MAC addresses for each logical interface.
To add a static MAC address for a logical interface in a bridge domain, include the static-mac mac-address
statement at the [edit bridge-domains bridge-domain-name bridge-options interface interface-name] hierarchy
level.
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge;
bridge-options {
interface interface-name {
static-mac mac-address {
<vlan-id number>;
34
}
}
}
}
}
You can optionally specify a VLAN identifier for the static MAC address by using the vlan-id statement.
To specify a VLAN identifier for a static MAC address, you must use the all option when configuring a
VLAN identifier for the bridge domain.
NOTE: If a static MAC address you configure for a logical interface appears on a different logical
interface, packets sent to that interface are dropped.
Configuring the Size of the MAC Address Table for a Bridge Domain
You can modify the size of the MAC address table for each bridge domain. The default table size is
5120 addresses. The minimum you can configure is 16 addresses, and the maximum is
1,048,575 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 modify the size of the MAC table, include the mac-table-size limit statement at the [edit bridge-domains
bridge-domain-name bridge-options] hierarchy level:
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge;
bridge-options {
mac-table-size limit {
packet-action drop;
}
}
}
}
35
You can configure a limit on the number of MAC addresses learned from a specific bridge domain or
from a specific logical interface that belongs to a bridge domain.
To configure a limit for the number of MAC addresses learned from each logical interface in a bridge
domain, include the interface-mac-limit limit statement at the [edit bridge-domains bridge-domain-name bridge-
options] hierarchy level:
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
bridge-options {
interface-mac-limit limit;
}
}
}
To limit the number of MAC addresses learned from a specific logical interface in a bridge domain or an
entire bridge domain, include the interface-mac-limit limit statement at the [edit bridge-domains bridge-
domain-name bridge-options interface interface-name] or [edit bridge-domains bridge-domain-name bridge-options]
hierarchy level:
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
bridge-options {
interface-mac-limit limit{
packet-action drop;
}
interface interface-name {
interface-mac-limit limit{
packet-action drop;
}
}
}
36
}
}
For an access port, the default limit on the maximum number of MAC addresses that can be learned on
an access port is 1024. Because an access port can be configured in only one bridge domain in a
network topology, the default limit is 1024 addresses, which is same as the limit for MAC addresses
learned on a logical interface in a bridge domain (configured by including the interface-mac-limit limit
statement at the [edit bridge-domains bridge-domain-name bridge-options interface interface-name] or [edit
bridge-domains bridge-domain-name bridge-options] hierarchy level.
For a trunk port, the default limit on the maximum number of MAC addresses that can be learned on a
trunk port is 8192. Because a trunk port can be associated with multiple bride domains, the default limit
is the same as the limit for MAC addresses learned on a logical interface in a virtual switch instance
(configured by including the interface-mac-limit limit statement at the [edit routing-instances routing-
instance-name switch- options interface interface-name] for a virtual switch instance).
The value you configure for a specific logical interface overrides any value you specify for the entire
bridge domain at the [edit bridge-domains bridge-domain-name bridge-options] hierarchy level.
The default limit to the number of MAC addresses that can be learned on a logical interface is 1024. The
range that you can configure for a specific logical interface is 1 through 131,071.
After the 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 by including the packet-action drop
statement. To specify that packets be dropped for the entire bridge domain, include the packet-action drop
statement at the [edit bridge-domains bridge-domain-name bridge-options interface-mac-limit limit] hierarchy
level:
To specify that the packets be dropped for a specific logical interface in a bridge domain, include the
packet-action drop statement at the [edit bridge-domains bridge-domain-name bridge-options interface interface-
name interface-mac-limit limit] hierarchy level:
NOTE: The behavior is different for some configurations. For aggregated Ethernet interfaces and
label-switched interfaces, the behavior is to learn all the new MAC addresses even when the
limit has been reached. The excess addresses are later deleted. The learning limit does not apply
to bridge domain trunk ports, because they have no counters for the individual domains, and
those domains might have different MAC learning limits.
NOTE: When static MAC addresses are configured, the learning limit is the configured limit
minus the number of static addresses.
NOTE: On MX Series routers running Junos OS Release 8.4 and later, statistics for an aged
destination MAC entry are not retained. In addition, source and destination statistics are reset
during a MAC move. In previous releases, only source statistics were reset during a MAC move.
You can also configure a limit to the number of MAC addresses learned for an MX Series router.
IN THIS SECTION
You can configure a limit on the number of MAC addresses learned from a specific logical interface. This
feature allows the MAC address table space to be distributed among different logical interfaces, thereby
avoiding congestion. The MAC address limit can be applied for both VLAN and VPLS routing instances
and by default the MAC limit depends on the profile configured. You can limit the number of MAC
addresses learned for a bridge domain and a logical interface at the same time.
38
You can configure the MAC Address limit by using the set protocols l2-learning global-no-hw-mac-learning
CLI command.
NOTE: On ACX Series routers, MAC address limiting is supported only on ACX5000 line of
routers.
The following configuration example enables limiting MAC address learning on logical interfaces:
[edit protocols]
l2-learning {
global-no-hw-mac-learning;
}
You can configure a limit to the number of MAC addresses learned from the logical interfaces on an MX
Series router.
To configure a limit to the total number of MAC addresses that can be learned from the logical
interfaces, include the global-mac-limit limit statement at the [edit protocols l2-learning] hierarchy level:
The default limit to the number of MAC addresses that can be learned the router as a whole is 393,215.
The range that you can configure for the router as a whole is 20 through 1,048,575.
After the configured MAC address limit is reached, the default is for packets to be forwarded. You can
specify that the packets be dropped by including the packet-action drop statement at the [edit protocols l2-
learning global-mac-limit] hierarchy level:
[edit]
protocols {
l2-learning {
global-mac-limit limit {
packet-action drop;
}
}
}
39
To configure a limit for the number of MAC addresses learned on each logical interface in a VLAN,
include the interface-mac-limit limit statement at the [edit vlans vlan-name] hierarchy level. To limit the
MAC addresses learned on a specific logical interface of the VLAN, include the interface-mac-limit limit
statement at the [edit vlans vlan-name interface interface-name] hierarchy level. To limit the MAC addresses
learned on each of the logical interfaces of the VLAN, include the interface-mac-limit limit statement at
the [edit vlans vlan-name switch-options] hierarchy level.
The following example configures a limit for the number of MAC addresses learned on a logical interface
in a VLAN:
[edit vlans]
vlan10 {
interface ge-0/0/3.1;
interface ge-0/0/1.5;
switch-options {
interface-mac-limit {
10;
}
}
interface ge-0/0/1.5 {
interface-mac-limit {
20;
}
}
}
To configure a limit for the number of MAC addresses learned on each logical interface in a VPLS routing
instance, include the interface-mac-limit limit statement at the [edit routing-instances routing-instance-name
protocols vpls] hierarchy level. To limit the MAC addresses learned on a specific logical interface of the
VPLS instance, include the interface-mac-limit limit statement at the [edit routing-instances routing-
instance-name protocols vpls interface interface-name] hierarchy level.
The following is an example to configure a limit for the number of MAC addresses learned on a logical
interface in VPLS routing instance:
[edit routing-instance]
v1 {
40
protocols {
vpls {
interface-mac-limit {
10;
}
interface ge-0/0/1.3 {
interface-mac-limit {
20;
}
}
}
}
}
If you have configured an interface MAC address limit for the logical interface in a bridge domain and a
global MAC address limit for a bridge domain, then the interface MAC address limit is considered. The
following example shows two MAC address limits configured on the interface ge-0/0/3.5 with the
global value as 50 and local value as 30. In this case, the MAC address limit of 30 is considered for the
interface ge-0/0/3.5 in the bridge domain.
vlan20 {
interface ge-0/0/1.5;
interface ge-0/0/3.5;
switch-options {
interface-mac-limit {
50;
}
interface ge-0/0/1.5;
interface ge-0/0/3.5 {
interface-mac-limit {
30;
}
}
}
}
The following CLI commands are used for configuring MAC address limiting:
41
• set vlans vlan-name switch-options interface-mac-limit limit—Command to configure the MAC address
limit for each logical interface in a VLAN. The limit is applied to all logical interfaces belonging to the
VLAN for which a separate interface MAC address limit is not configured.
By default, MAC accounting is disabled. On MX Series routers, you can enable packet accounting either
for the router as a whole or for a specific bridge domain. After you enable packet accounting, the Junos
OS maintains packet counters for each MAC address learned.
To enable MAC accounting for an MX Series router, include the global-mac-statistics statement at the
[edit protocols l2-learning] hierarchy level:
To enable MAC accounting for a bridge domain, include the mac-statistics statement at the [edit bridge-
domains bridge-domain-name bridge-options] hierarchy level:
You can disable MAC learning for all logical interfaces in a specified bridge domain, or for a specific
logical interface in a bridge domain. Disabling dynamic MAC learning prevents the specified interfaces
from learning source MAC addresses.
To disable MAC learning for all logical interfaces in a bridge domain in a virtual switch, include the no-mac-
learning statement at the [edit bridge-domains bridge-domain-name bridge-options] hierarchy level:
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
bridge-options {
no-mac-learning;
}
}
}
To disable MAC learning for a specific logical interface in a bridge domain, include the no-mac-learning
statement at the [edit bridge-domains bridge-domain-name bridge-options interface interface-name] hierarchy
level.
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
bridge-options {
interface interface-name {
no-mac-learning;
}
}
}
}
43
NOTE: When you disable MAC learning, source MAC addresses are not dynamically learned, and
any packets sent to these source addresses are flooded into the bridge domain.
NOTE: When you gather interfaces into a bridge domain, the no-mac-learn-enable statement at the
[edit interfaces interface-name gigether-options ethernet-switch-profile] hierarchy level is not
supported. You must use the no-mac-learning statement at the [edit bridge-domains bridge-domain-name
bridge-options interface interface-name] hierarchy level to disable MAC learning on an interface in a
bridge domain.
NOTE: 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.
The MAC table aging process ensures that a router tracks only active MAC addresses on the network
and is able to flush out address that are no longer used.
You can configure the MAC table aging time, the maximum time that an entry can remain in the MAC
table before it “ages out,” on all bridge domains, one or all VPLS instances, or one or all Ethernet virtual
private network (EVPNs) instances on the router. This configuration can influence efficiency of network
resource use by affecting the amount of traffic that is flooded to all interfaces because when traffic is
received for MAC addresses no longer in the Ethernet routing table, the router floods the traffic to all
interfaces.
Depending on how long you want to keep a MAC address in a MAC table before it expires, you can
either increase or decrease the aging timer. By default, the timeout interval for all entries in the MAC
table is 300 seconds. You can modify the timeout interval for MAC table entries on an MX Series router.
You cannot modify the timeout interval for a virtual switch.
NOTE: The timeout interval applies only to dynamically learned MAC addresses. This value does
not apply to configured static MAC addresses, which never time out.
You can modify the timeout interval for a router(at the global level) or on a per-domain basis (bridge
domain).
• To modify the timeout interval for the MAC table for a router:
• To modify the timeout for a VPLS or an Ethernet virtual private network (EVPN) instance within a
bridge domain:
IN THIS SECTION
Requirements | 44
Overview | 45
Configuration | 45
Verification | 48
This example shows how to detect loops using the MAC move approach.
Requirements
This example requires the following hardware and software components:
45
Overview
When a MAC address appears on a different physical interface or within a different unit of the same
physical interface and if this behavior occurs frequently, it is considered a MAC move.
Configuration errors at the network can force traffic into never ending circular paths. Once there are
loops in the Layer 2 network, one of the symptoms is frequent MAC moves, which can be used for
rectification of the problem. When it is observed that a source MAC address is moving among the ports,
interface is blocked based on the configured action-priority for the interface. If the action-priority value
configured for interfaces is the same, the last interface for the bridge domain on which the MAC address
move occurred is blocked.
Configuration
IN THIS SECTION
Results | 47
To quickly configure this example, copy the following commands, paste them into a text file, remove any
line breaks, change any details necessary to match your network configuration, and then copy and paste
the commands into the CLI at the [edit] hierarchy level.
In the previous example, all the interfaces, including the trunk interfaces in bd10 and bd11 will be
monitored. If there are frequent MAC moves detected within interfaces ge-1/0/5 and ge-1/0/6,
interface ge-1/0/5 is blocked. The blocking for trunk interfaces is such that data traffic only for a VLAN
(on which the MAC move is detected) will be blocked and not for all the VLANs in the trunk. No action
will be taken if a frequent MAC move is observed in bd12.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For
information about navigating the CLI, see Using the CLI Editor in Configuration Mode.
[edit interfaces]
user@host# set ge-1/0/4 vlan-tagging
user@host# set ge-1/0/4 encapsulation flexible-ethernet-services
user@host# set ge-1/0/4 unit 10 encapsulation vlan-bridge
user@host# set ge-1/0/4 unit 10 vlan-id 10
user@host# set ge-1/0/4 unit 11 encapsulation vlan-bridge
user@host# set ge-1/0/4 unit 11 vlan-id 11
user@host# set ge-1/0/5 unit 0 family bridge interface-mode trunk
user@host# set ge-1/0/5 unit 0 family bridge vlan-id-list 10-12
user@host# set ge-1/0/6 unit 0 family bridge interface-mode trunk
user@host# set ge-1/0/6 unit 0 family bridge vlan-id-list 10-12
[edit bridge-domains]
user@host# set bd10 vlan-id 10
47
Results
From configuration mode, confirm your configuration by entering show interfaces and show bridge-domains
commands. If the output does not display the intended configuration, repeat the instructions in this
example to correct the configuration.
}
}
If you are done configuring the device, enter commit from configuration mode.
Verification
IN THIS SECTION
Verifying That the Logical Interfaces Blocked Due to MAC Move Are Displayed | 49
49
Verifying That the Logical Interfaces Blocked Due to MAC Move Are Displayed
Purpose
Ensure that the current set of logical interfaces blocked due to a MAC move, if any, are displayed.
Action
From operational mode, enter the show l2-learning mac-move-buffer active command.
Meaning
As a result of MAC move detection, one of the involved interface bridge domains will be blocked. The
output shows that the ge-1/0/6 logical interface is blocked.
SEE ALSO
bridge-domains
Understanding Layer 2 Learning and Forwarding
In a bridge domain, when a frame is received from a CE interface, it is flooded to the other CE interfaces
and all of the provider edge (PE) interfaces if the destination MAC address is not learned or if the frame
is either broadcast or multicast. If the destination MAC address is learned on another CE device, such a
frame is unicasted to the CE interface on which the MAC address is learned. This might not be desirable
if the service provider does not want CE devices to communicate with each other directly.
To prevent CE devices from communicating directly, include the no-local-switching statement at the [edit
bridge-domains bridge-domain-name] hierarchy level. Configure the logical interfaces in the bridge domain as
50
core-facing (PE interfaces) by including the core-facing statement at the [edit interfaces interface-nameunit
logical-unit-number family family] hierarchy level to specify that the VLAN is physically connected to a
core-facing ISP router and ensures that the network does not improperly treat the interface as a client
interface. When specified, traffic from one CE interface is not forwarded to another CE interface.
For the no-local-switching option , integrated routing and bridging (IRB) configured on a bridge domain
with this option enabled is not treated as a designated CE or PE interface. Traffic arriving from a CE or
PE interface can navigate towards IRB and traffic that reaches in the input direction to the IRB can pass
out of a CE or PE interface. The disabling of local switching achieves the functionality of split-horizon in
a bridge domain. If no-local-switching is configured in a bridge domain, , then traffic cannot flow
between CE and CE interfaces. This stoppage of trafic flow includes known unicast and multicast,
unknown unicast and multicast, and broadcast traffic. However, traffic continues to be transmitted
between CE and PE interfaces, and PE and PE interfaces..
IN THIS SECTION
• Eliminates the need for MAC address learning, which is required for traffic forwarding
You can configure a MAC address for an entire chassis, also called as local station MAC. Local station
MAC helps to identify the devices in the network. This eliminates the need for MAC address learning,
which is required for traffic forwarding. In an upstream network, when MAC address learning is not
performed, resources in MAC address table can be conserved, therefore network resources can be
optimized better in the network.
When a device comes up in the network, the device will have MAC addresses for all the physical
interfaces, AE interfaces, IRB, multicast broadcast MACs, etc. All the MAC addresses are added to the
local MAC table.
When a neighbor device sends an IP packet, the device initiates an ARP request and finds the MAC
address of the interface. An ARP entry is added to the ARP table with the destination MAC (DMAC) of
51
the frame every time a packet is sent to that IP. When a packet is received with DMAC matching the
configured station MAC, the packet is routed to the network stack.
To configure a MAC address for the entire chassis, use the local-station-mac mac-address configuration
statement at the [edit chassis] hierarchy level.
You can configure MAC learning priority on interfaces so that MAC addresses are always learnt on the
high priority interface.
If two interfaces receive the traffic with the same source MAC address, the MAC address is learnt on the
high priority interface and the interface continues to forward the traffic. However, when an low priority
interface receives the traffic from the same source MAC address, the traffic is discarded and will not be
forwarded in the VLAN. MAC address move will not happen through the lower priority interface.
MAC address move is allowed when you configure the interfaces with the same MAC learning priority.
When interfaces are not configured with MAC learning priority, then the default priority for each
interface is 4.
In scenarios where you want the source MAC address to be learnt on a particular interface but still
forward traffic received on other interfaces of the VLAN (without MAC move to the new interface), then
you can configure persistent MAC learning on other interfaces. See Understanding and Using Persistent
MAC Learning .
To configure MAC learning priority, use the mac-learning-priority configuration statement at the [edit
switch-options interface interface-name] hierarchy level.
3 CHAPTER
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:
54
• Limit the number of MAC addresses learned from the Layer 2 trunk port associated with the set of
bridge domains
• Modify the size of the MAC address table for the set of bridge domains
You can configure a set of bridge domains that are associated with a Layer 2 trunk port. The set of
bridge domains function as a switch. Packets received on a trunk interface are forwarded within a bridge
domain that has the same VLAN identifier. A trunk interface also provides support for IRB, which
provides support for Layer 2 bridging and Layer 3 IP routing on the same interface.
To configure a Layer 2 trunk port and set of bridge domains, include the following statements:
[edit interfaces]
interface-name {
unit number {
family bridge {
interface-mode access;
vlan-id number;
}
}
}
interface-name {
native-vlan-id number;
unit number {
family bridge {
interface-mode trunk;
vlan-id-list [ vlan-id-numbers ];
}
}
}
[edit bridge-domains]
bridge-domain-name {
vlan-id number;
vlan-id-list [ vlan-id-numbers ];
. . . .
}
55
You must configure a bridge domain and VLAN identifier for each VLAN associated with the trunk
interface. You can configure one or more trunk or access interfaces at the [edit interfaces] hierarchy
level. An access interface enables you to accept packets with no VLAN identifier. For more information
about configuring trunk and access interfaces, see the Interfaces User Guide for Security Devices.
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 1 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
56
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:
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:
Configuring 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 statement at
the [edit switch-options] hierarchy level:
[edit switch-options]
mac-table-size limit;
By default, MAC accounting is disabled. You can enable packet counting for a set of bridge domains.
After you enable packet accounting, the Junos OS maintains packet counters for each MAC address
learned on the trunk port associated with the set of bridge domains.
57
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;
By default, MAC learning is enabled 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;
4 CHAPTER
On MX Series routers only, you can group one or more bridge domains to form a virtual switch to isolate
a LAN segment with its spanning-tree protocol instance and separate its VLAN ID space. A bridge
domain consists of a set of logical ports that share the same flooding or broadcast characteristics. Like a
virtual LAN, a bridge domain spans one or more ports of multiple devices. You can configure multiple
virtual switches, each of which operates independently of the other virtual switches on the routing
platform. Thus, each virtual switch can participate in a different Layer 2 network.
You can configure a virtual switch to participate only in Layer 2 bridging and optionally to perform
Layer 3 routing. In addition, you can configure one of three Layer 2 control protocols—Spanning-Tree
Protocol, Rapid Spanning-Tree Protocol (RSTP), or Multiple Spanning-Tree Protocol (MSTP)—to prevent
forwarding loops. For more information about how to configure Layer 2 logical ports on an interface, see
the Junos OS Network Interfaces Library for Routing Devices.
60
In Junos OS Release 9.2 and later, you can associate one or more logical interfaces configured as trunk
interfaces with a virtual switch. A trunk interface, or Layer 2 trunk port, enables you to configure a
logical interface to represent multiple VLANs on the physical interface. Packets received on a trunk
interface are forwarded within a bridge domain that has same VLAN identifier. For more information
about how to configure trunk interfaces, see the Junos OS Network Interfaces Library for Routing
Devices.
You can also configure Layer 2 forwarding and learning properties for the virtual switch as well as any
bridge domains that belong to a virtual switch. .
For more information about configuring a routing instance for Layer 2 VPN, see the Junos OS VPNs
Library for Routing Devices. .
A Layer 2 virtual switch, which isolates a LAN segment with its spanning-tree protocol instance and
separates its VLAN ID space, filters and forwards traffic only at the data link layer. Layer 3 routing is not
performed. Each bridge domain consists of a set of logical ports that participate in Layer 2 learning and
forwarding. A virtual switch represents a Layer 2 network.
• Layer 2 logical interface—This type of interface uses the VLAN-ID as a virtual circuit identifier and
the scope of the VLAN-ID is local to the interface port. This type of interface is often used in service-
provider-centric applications.
• Access or trunk interface—This type of interface uses a VLAN-ID with global significance. The access
or trunk interface is implicitly associated with bridge domains based on VLAN membership. Access or
trunk interfaces are typically used in enterprise-centric applications.
NOTE: The difference between access interfaces and trunk interfaces is that access interfaces
can be part of one VLAN only and the interface is normally attached to an end-user device
(packets are implicitly associated with the configured VLAN). In contrast, trunk interfaces
multiplex traffic from multiple VLANs and usually interconnect switches.
[edit]
routing-instances {
routing-instance-name (
61
instance-type virtual-switch;
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
vlan-id (all | none | number); # Cannot be used with ’vlan-tags’ statement
vlan-id-list [ vlan-id-numbers ];
vlan-tags outer number inner number; # Cannot be used with ’vlan-id’ statement
}
}
protocols {
mstp {
...mstp-configuration ...
}
}
}
}
For each bridge domain that you configure for the virtual switch, specify a bridge-domain-name. You
must also specify the value bridge for the domain-type statement.
For the vlan-id statement, you can specify either a valid VLAN identifier or the none or all options.
NOTE: You do not have to specify a VLAN identifier for a bridge domain. However, you cannot
specify the same VLAN identifier for more than one bridge domain within a virtual switch. Each
bridge domain within a virtual switch must have a unique VLAN identifier.
NOTE: For a single bridge domain, you can include either the vlan-id statement or the vlan-tags
statement, but not both. The vlan-id statement, vlan-id-list statement, and vlan-tags statement
are mutually exclusive.
The vlan-id-list statement allows you to automatically create multiple bridge-domains for each vlan-id in
the list.
To specify one or more logical interfaces to include in the bridge domain, specify an interface-name for
an Ethernet interface you configured at the [edit interfaces] hierarchy level. For more information, see
the Junos OS Network Interfaces Library for Routing Devices.
62
On MX Series routers only, use the virtual-switch routing instance type to isolate a LAN segment with its
spanning-tree instance and to separate its VLAN ID space. A bridge domain consists of a set of ports
that share the same flooding or broadcast characteristics. Each virtual switch represents a Layer 2
network. You can optionally configure a virtual switch to support Integrated Routing and Bridging (IRB),
which facilitates simultaneous Layer 2 bridging and Layer 3 IP routing on the same interface. You can
also configure Layer 2 control protocols to provide loop resolution. Protocols supported include the
Spanning-Tree Protocol (STP), Rapid Spanning-Tree Protocols (RSTP), Multiple Spanning-Tree Protocol
(MSTP), and VLAN Spanning-Tree Protocol (VSTP).
To create a routing instance for a virtual switch, include at least the following statements in the
configuration:
[edit]
routing-instances {
routing-instance-name
instance-type virtual-switch;
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
vlan-id (all | none | number);
vlan-tags outer number inner number;
}
}
protocols {
(rstp | mstp | vstp) {
...stp-configuration ...
}
}
}
}
For more information about configuring virtual switches, see Configuring a Layer 2 Virtual Switch .
In Junos OS Release 9.3 and later, you can configure VPLS ports in a virtual switch so that the logical
interfaces of the Layer 2 bridge domains in the virtual switch can handle VPLS routing instance traffic.
63
VPLS configuration no longer requires a dedicated routing instance of type vpls. Packets received on a
Layer 2 trunk interface are forwarded within a bridge domain that has the same VLAN identifier.
A trunk interface is implicitly associated with bridge domains based on VLAN membership. Whereas
access interfaces can be part of one VLAN only, trunk interfaces multiplex traffic from multiple VLANs
and usually interconnect switches. A Layer 2 trunk port also supports IRB.
1. To configure the Layer 2 trunk ports that you will associate with the bridge domains in the virtual
switch, include the following statements in the configuration:
[edit]
interfaces {
interface-name {
unit logical-unit-number { # Call this ’L2-trunk-port-A’
family bridge {
interface-mode trunk;
vlan-id-list [ vlan-id-numbers ] ; # Trunk mode VLAN membership for this
interface
}
}
}
.
.
.
interface-name {
unit logical-unit-number { # Call this ’L2-trunk-port-B’
family bridge {
interface-mode trunk;
vlan-id-list [ vlan-id-numbers ] ; # Trunk mode VLAN membership for this
interface
}
}
}
}
To configure a logical interface as a trunk port, include the interface-mode statement and the trunk
option at the [edit interfaces interface-name unit logical-unit-number family bridge] hierarchy level.
To configure all the VLAN identifiers to associate with a Layer 2 trunk port, include the vlan-id-
list [ vlan-id-numbers ] statement at the [edit interfaces interface-name unit logical-unit-number family
bridge] hierarchy level.
64
Each of the logical interfaces “L2-trunk-port-A” and “L2-trunk-port-B” accepts packets tagged with
any VLAN ID specified in the respective vlan-id-list statements.
2. To configure a virtual switch consisting of a set of bridge domains that are associated with one or
more logical interfaces configured as a trunk ports, include the following statements in the
configuration:
[edit]
routing-instance {
routing-instance-name
instance-type virtual-switch;
interface L2-trunk-port-A; # Include one trunk port
interface L2-trunk-port-B; # Include the other trunk port
bridge-domains {
bridge-domain-name-0 {
domain-type bridge;
vlan-id number;
}
bridge-domain-name-1 {
domain-type bridge;
vlan-id number;
}
}
protocols {
vpls {
vpls-id number;
... vpls-configuration ...
}
}
}
}
To begin configuring a virtual switch, include the instance-type statement and the virtual-switch option
at the [edit routing-instances routing-instance-name] hierarchy level.
To configure a virtual switch consisting of a set of bridge domains that are associated with one or
more logical interfaces configured as a trunk ports, you must identify each logical interface by
including the interface interface-name statement at the [edit routing-instances routing-instance-name]
hierarchy level.
For each VLAN configured for a trunk port, you must configure a bridge-domain that includes the
trunk port logical interface and uses a VLAN identifier within the range carried by that trunk
65
interface. To configure, include the domain-type bridge, vlan-id number, and statements at the [edit
routing-instances routing-instance-name bridge-domain bridge-domain-name] hierarchy level.
You can associate one or more Layer 2 trunk interfaces with a virtual switch. A Layer 2 trunk interface
enables you to configure a logical interface to represent multiple VLANs on the physical interface.
Within the virtual switch, you configure a bridge domain and VLAN identifier for each VLAN identifier
configured on the trunk interfaces. Packets received on a trunk interface are forwarded within a bridge
domain that has the same VLAN identifier. Each virtual switch you configure operates independently
and can participate in a different Layer 2 network.
A virtual switch configured with a Layer 2 trunk port also supports IRB within a bridge domain. IRB
provides simultaneous support for Layer 2 bridging and Layer 3 IP routing on the same interface. Only
an interface configured with the interface-mode (access | trunk) statement can be associated with a virtual
switch. An access interface enables you to accept packets with no VLAN identifier. For more information
about configuring trunk and access interfaces, see the Junos OS Network Interfaces Library for Routing
Devices.
In addition, you can configure Layer 2 learning and forwarding properties for the virtual switch.
To configure a virtual switch with a Layer 2 trunk interface, include the following statements:
[edit]
routing-instances {
routing-instance-name {
instance-type virtual-switch;
interface interface-name;
bridge-domains {
bridge-domain-name {
vlan-id number;
}
}
}
}
NOTE: You must configure a bridge domain and VLAN identifier for each VLAN identifier
configured for the trunk interface.
66
Layer 2 trunk ports are used in two distinct types of virtual switch configuration. One method is called
service provider style and the other is called enterprise style. The two methods can be confusing
because both methods involve configuring interfaces known as trunk interfaces. However, both types of
configuration are distinct.
Service provider style and enterprise style each have benefits and drawbacks.
• Service provider style—Offers more control, but requires more care in configuration. Service
providers can use all bridging features in any shape or size, but for large bridged designs,
customization requirements quickly grow.
• Enterprise style—Offers a single Layer 2 network connected by simple bridges. Easier to use, but
more limited in function. Configuration is simple and straightforward and condensed.
NOTE: The terms “service provider style” and “enterprise style” do not imply any limitations
based on organization type or size. Any large enterprise may use service-provider-style
configurations and a small regional service provider is free to use enterprise style. The
differences apply only to the configuration styles.
The easiest way to understand the differences in configuration of the two styles is to compare them
using the same interfaces and VLAN IDs.
You can configure multiple bridge domains between the same pair of Ethernet interfaces, for example,
xe-0/0/1 and xe-0/0/2. If there are two bridge domains needed, you can configure one bridge domain as
VLAN-100 and the other as VLAN-200. However, the configuration requirements are different when
implementing service provider style or enterprise style. Here is a look at both styles using the same
interfaces and VLANs.
Service provider style involves configuring the values for three main parameters, plus the bridge
domains to connect them:
• VLAN tagging—Configure the bridged physical interfaces with vlan-tagging to allow them to operate in
IEEE 802.1Q mode, also known as a trunk interface.
• Extended VLAN Bridge—Configure the physical interface with the encapsulation statement type
extended-vlan-bridge to allow bridging on each logical interface.
• Logical unit—Configure a logical unit for each bridged VLAN ID. In most cases, you configure the unit
number to be the same as the VLAN ID (that is, unit 100 = VLAN ID 100).
• Bridge domains—Configure the VLAN bridge domains to associate the logical interfaces with the
correct VLAN IDs.
67
Here is the service provider style configuration showing two interfaces used for bridging across two
bridge domains, VLAN ID 100 and 200.
[edit]
interfaces {
xe-0/0/1 {
vlan-tagging;
encapsulation extended-vlan-bridge;
unit 100 {
vlan-id 100;
}
unit 200 {
vlan-id 200;
}
}
xe-0/0/2 {
vlan-tagging;
encapsulation extended-vlan-bridge;
unit 100 {
vlan-id 100;
}
unit 200 {
vlan-id 200;
}
}
}
bridge-domains {
VLAN-100 {
vlan-id 100;
interface xe-0/0/1.100;
interface xe-0/0/2.100;
}
VLAN-200 {
vlan-id 200;
interface xe-0/0/1.200;
interface xe-0/0/2.200;
}
}
Note that each physical interface has VLAN tagging enabled as well as extended VLAN bridge
encapsulation. There are many more parameters that can be configured in service provider style.
68
In contrast, enterprise style involves configuring the values for three different parameters, plus the
bridge domains to connect them:
• Family— Configure each bridged physical interface with the family type bridge.
• Interface mode—Configure logical interface so that the physical interface operates as either an
untagged access port (not shown in this topic) or as an IEEE 801Q trunk.
• VLAN ID—Configure each logical interface with a VLAN ID to determine with which bridge the
interface belongs.
• Bridge domain—Configure the VLAN bridge domains to associate with the correct VLAN IDs.
NOTE: Enterprise style is simpler than the service provider style. Enterprise style automatically
places interfaces in bridge domains when the configuration is committed.
Here is the enterprise style configuration showing the same two interfaces used for bridging across the
same two bridge domains, VLAN ID 100 and 200.
[edit]
interfaces {
xe-0/0/1 {
unit 0 {
family bridge {
interface-mode trunk;
vlan-id-list [ 100 200 ];
}
}
}
xe-0/0/2 {
unit 0 {
family bridge {
interface-mode trunk;
vlan-id-list [ 100 200 ];
}
}
}
}
bridge-domains {
VLAN-100 {
vlan-id 100;
69
}
VLAN-200 {
vlan-id 200;
}
}
In exchange for simplicity, enterprise style does not allow you to configure VLAN tagging options or
encapsulation type. You do not create a separate logical interface for each VLAN ID.
NOTE: You can configure more parameters in each style. These further parameters are beyond
the scope of this basic configuration topic.
Integrated routing and bridging (IRB) provides simultaneous support for Layer 2 bridging and Layer 3 IP
routing on the same interface. IRB enables you to route local packets to another routed interface or to
another bridge domain that has a Layer 3 protocol configured. You configure a logical routing interface
by including the irb statement at [edit interfaces] hierarchy level and include that interface in the bridge
domain. For more information about how to configure a routing interface, see the Junos OS Network
Interfaces Library for Routing Devices.
NOTE: You can include only one routing interface in a bridge domain.
To configure a virtual switch with IRB support, include the following statements:
[edit]
routing-instances {
routing-instance-name {
instance-type virtual-switch;
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
routing-interface routing-interface-name;
vlan-id (none | number);
70
To enable a virtual switch, you must specify virtual-switch as the instance-type. The instance-type virtual-
switch statement is not supported at the [edit logical-systems logical-system-name] hierarchy level.
For each bridge domain that you configure for the virtual switch, specify a bridge-domain-name. You
must also specify the value bridge for the domain-type statement.
For the vlan-id statement, you can specify either a valid VLAN identifier or the none option.
NOTE: For a single bridge domain, you can include either the vlan-id statement or the vlan-tags
statement, but not both.
To include one or more logical interfaces in the bridge domain, specify the interface-name for each
Ethernet interface to include that you configured at the [edit interfaces irb] hierarchy level.
To associate a routing interface with a bridge domain, include the routing-interface routing-interface-name
statement and specify a routing-interface-name you configured at the [edit interfaces irb] hierarchy
level. You can configure only one routing interface for each bridge domain. For more information about
how to configure logical and routing interfaces, see the Junos OS Network Interfaces Library for Routing
Devices.
NOTE: If you configure a routing interface to support IRB in a bridge domain, you cannot use the
all option for the vlan-id statement.
Integrated routing and bridging (IRB) provides simultaneous support for Layer 2 bridging and Layer 3
routing on the same interface. IRB enables you to route packets to another routed interface or to
another bridge domain that has an IRB interface configured. You configure a logical routing interface by
including the irb statement at the [edit interfaces] hierarchy level and include that interface in the bridge
domain. For more information about how to configure a routing interface, see the Junos OS Network
Interfaces Library for Routing Devices.
71
NOTE: You can include only one routing interface in a bridge domain.
• Routing protocols supported on an IRB interface are BGP, ISIS, OSPF, RIP, IGMP, and PIM.
• Firewall filters (multifield filter) can be used to assign forwarding class and loss priority. You should
define a family inet or inet6 filter and apply it as the input filter on an IRB logical interface under
family inet.
NOTE: physical-interface-filter is not supported for family inet6 filter on IRB logical
interface.
• [edit protocols (bgp | isis | ospf | rip | igmp | pim) interface irb.unit] hierarchy level
In ACX5048 and ACX5096 routers, you can configure IRB at the [edit vlans vlan-name] l3-interface
irb.unit; level.
NOTE: The Layer 2 CLI configurations and show commands for ACX5048 and ACX5096 routers
differ compared to other ACX Series routers. For more information, see Layer 2 Next Generation
Mode for ACX Series.
To configure a bridge domain with IRB support, include the following statements:
[edit]
bridge-domains {
bridge-domain-name {
domain-type bridge;
interface interface-name;
routing-interface routing-interface-name;
vlan-id (none | number);
vlan-tags outer number inner number;
}
}
For each bridge domain that you configure, specify a bridge-domain-name. You must also specify the
value bridge for the domain-type statement.
For the vlan-id statement, you can specify either a valid VLAN identifier or the none option.
The vlan-tags statement enables you to specify a pair of VLAN identifiers; an outer tag and an inner tag.
73
NOTE: For a single bridge domain, you can include either the vlan-id statement or the vlan-tags
statement, but not both.
To include one or more logical interfaces in the bridge domain, specify the interface-name for each
Ethernet interface to include that you configured at the [edit interfaces] hierarchy level.
NOTE: A maximum of 4000 active logical interfaces are supported on a bridge domain
configured for Layer 2 bridging.
To associate a routing interface with a bridge domain, include the routing-interface routing-interface-name
statement and specify a routing-interface-name you configured at the [edit interfaces irb] hierarchy
level. You can configure only one routing interface for each bridge domain. For more information about
how to configure logical and routing interfaces, see the Junos OS Network Interfaces Library for Routing
Devices.
In Junos OS Release 9.0 and later, IRB interfaces are supported for multicast snooping. For more
information about multicast snooping, see the Junos OS Multicast Protocols User Guide.
NOTE: When you configure multiple IRB logical interfaces, all the IRB logical interfaces share the
same MAC address.
[edit]
interfaces {
ge-1/0/0 {
encapsulation flexible-ethernet-services;
flexible-vlan-tagging;
unit 0 {
encapsulation vlan-bridge;
vlan-id 100;
}
}
}
ge-1/0/1 {
encapsulation flexible-ethernet-services;
flexible-vlan-tagging;
74
unit 0 {
encapsulation vlan-bridge;
vlan-id 100;
}
}
}
irb {
unit 0 {
family inet {
address 10.0.1.2/24 {
}
}
}
}
bridge-domains {
bd {
domain-type bridge;
vlan-id none;
interface ge-1/0/0.0;
interface ge-1/0/1.0;
routing-interface irb.0;
}
}
1 PART
Configuration Statements
CHAPTER 5
IN THIS CHAPTER
action-priority | 77
bridge-domains | 78
bridge-options | 80
disable-action | 82
enable-mac-move-action | 85
interface | 86
interface-mac-limit | 88
mac-statistics | 91
mac-table-size | 93
mac-table-aging-time | 95
no-irb-layer-2-copy | 97
no-mac-learning | 98
packet-action | 102
reopen-time | 106
routing-interface | 107
service-id | 109
static-mac | 111
vlan-id-list | 113
vlan-tags | 115
77
action-priority
IN THIS SECTION
Syntax | 77
Hierarchy Level | 77
Description | 77
Default | 77
Release Information | 78
Syntax
action-priority number;
Hierarchy Level
Description
Configure the action priority value for an interface in a bridge domain on MAC move detection. This
priority value is used to determine which interface should be blocked when a throttled MAC move is
detected between two interfaces. The priority value can be between 0 and 7 inclusive. A higher value
means lower priority. For example, if a MAC address move occurs between two interfaces with the
action priority value set to 5 and 6, the interface with value 5 as the action priority value is blocked.
Default
4
78
Release Information
RELATED DOCUMENTATION
bridge-domains
IN THIS SECTION
Syntax | 78
Hierarchy Level | 79
Description | 79
Options | 79
Release Information | 80
Syntax
bridge-domains {
bridge-domain-name {
bridge-options {
...bridge-options-configuration...
}
domain-type bridge;
79
interface interface-name;
no-irb-layer-2-copy;
no-local-switching;
routing-interface routing-interface-name;
vlan-id (all | none | number);
vlan-id-list [ vlan-id-numbers ];
vlan-tags outer number inner number;
bridge-options {
interface interface-name {
mac-pinning
static-mac mac-address;
}
interface-mac-limit limit;
mac-statistics;
mac-table-size limit;
no-mac-learning;
}
}
}
Hierarchy Level
[edit],
[edit logical-systems logical-system-name routing-instances routing-instance-name],
[edit routing-instances routing-instance-name]
Description
(MX Series routers only) Configure a domain that includes a set of logical ports that share the same
flooding or broadcast characteristics in order to perform Layer 2 bridging.
Options
NOTE: You cannot use the slash (/) character as part of the bridge domain name. If you do, the
configuration will not commit.
80
Release Information
RELATED DOCUMENTATION
bridge-options
IN THIS SECTION
Syntax | 80
Hierarchy Level | 81
Description | 81
Release Information | 81
Syntax
bridge-options {
interface interface-name;
81
static-mac static-mac-address;
}
global-mac-ip-limit limit;
interface-mac-ip-limit limit;
interface-mac-limit limit;
packet-action drop;
}
mac-pinning
mac-statistics;
mac-ip-table-size limit;
mac-table-size limit;
mac-table-aging-time time;
no-mac-learning;
}
Hierarchy Level
Description
(MX Series routers only) Configure Layer 2 learning and forwarding properties for a bridge domain or a
virtual switch.
Release Information
RELATED DOCUMENTATION
disable-action
IN THIS SECTION
Syntax | 82
Hierarchy Level | 82
Description | 82
Release Information | 83
Syntax
disable-action;
Hierarchy Level
Description
(MX Series routers only) Disable the MAC move action feature globally. MAC move detection
configuration does exist, but the action is disabled.
83
Release Information
RELATED DOCUMENTATION
IN THIS SECTION
Syntax | 83
SRX Series | 84
Description | 84
Release Information | 85
Syntax
domain-type bridge;
84
SRX Series
Description
NOTE: There is only one domain type bridge, that can be configured on SRX Series devices.
Domain type bridge is not enabled by default. An SRX Series device operates in the Layer 2
transparent mode when all physical bridge domains on the device are partitioned into logical
bridge domains.
NOTE: Starting with Junos OS Release 15.1X49-D10 and Junos OS Release 17.3R1, the CLI
domain-type is not available.
NOTE: Starting in Junos OS Release 15.1X49-D10 and Junos OS Release 17.3R1, the hierarchy
[edit bridge-domains bridge-domain-name] is renamed to [edit vlans vlan-name]. For detailed information
about the modified hierarchies, see Enhanced Layer 2 CLI Configuration Statement and
Command Changes for Security Devices.
Release Information
RELATED DOCUMENTATION
enable-mac-move-action
IN THIS SECTION
Syntax | 85
Hierarchy Level | 85
Description | 86
Release Information | 86
Syntax
enable-mac-move-action;
Hierarchy Level
Description
Enable the MAC move action feature at the bridge domain level. This statement blocks the logical
interface for the bridge domain when a MAC move is detected on the interface.
Release Information
RELATED DOCUMENTATION
interface
IN THIS SECTION
Syntax | 87
Hierarchy Level | 87
Description | 87
Options | 87
Release Information | 87
87
Syntax
interface interface-name;
Hierarchy Level
Description
(MX Series routers and EX Series switches only) Specify the logical interfaces to include in the bridge
domain, VLAN, VPLS instance, or virtual switch.
Options
interface-name—Name of a logical interface. For more information about how to configure logical
interfaces, see the Junos OS Network Interfaces Library for Routing Devices.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2.
In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this statement only for a
VPLS instance or a bridge domain configured within a virtual switch.
RELATED DOCUMENTATION
interface-mac-limit
IN THIS SECTION
Syntax | 88
Hierarchy Level | 88
Description | 89
Default | 90
Options | 90
Release Information | 90
Syntax
interface-mac-limit {
limit
disable;
packet-action ;
}
Hierarchy Level
Description
Configure a limit to the number of MAC addresses that can be learned from a bridge domain, VLAN,
virtual switch, or set of bridge domains or VLANs.
NOTE: For multichassis link aggregation (MC-LAG) peers in active-active mode, configuring the
interface-mac-limit statement or changing the interface-mac-limit configuration when traffic is
flowing can cause the MAC entries to be out of synchronization between the two MC-LAG
peers, which might result in flooding. To avoid flooding, you must either halt traffic forwarding
and then configure the interface-mac-limit statement or use the commit at configuration
statement to commit the changes at the same time in both the peer nodes.
Alternatively, if flooding does occur, you can clear the bridge MAC table on both the routers or
switches by using the clear bridge mac-table command. Running this command ensures that the
MAC entries are re-learned and in synchronization between both the peers.
90
Default
Options
disable—Disables the global interface-mac-limit configuration on an interface and sets the maximum
interface-mac-limit that is permitted on the device.
• Range: 1 through <default MAC limit> MAC addresses per interface. Range is platform specific.
If you configure both disable and limit, disable takes precedence and packet-action is set to none. The
remaining statement is explained separately.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
[edit switch-options], [edit switch-options interface interface-name], [edit vlans vlan-name switch-
options], and [edit vlans vlan-name switch-options interface interface-name] hierarchy levels introduced
in Junos OS Release 12.3R2 for EX Series switches.
RELATED DOCUMENTATION
Understanding Layer 2 Learning and Forwarding for Bridge Domains Functioning as Switches with
Layer 2 Trunk Ports
Layer 2 Learning and Forwarding for VLANs Acting as a Switch for a Layer 2 Trunk Port
mac-statistics
IN THIS SECTION
Syntax | 91
Hierarchy Level | 91
Description | 92
Default | 92
Release Information | 92
Syntax
mac-statistics;
Hierarchy Level
Description
(MX Series routers, EX Series switches, and QFX Series only) For bridge domains or VLANs, enable MAC
accounting either for a specific bridge domain or VLAN, or for a set of bridge domains or VLANs
associated with a Layer 2 trunk port.
Default
disabled
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
[edit switch-options] and [edit vlans vlan-name switch-options] hierarchy levels introduced in Junos OS
Release 12.3R2 for EX Series switches.
Support for EVPNs added in Junos OS Release 13.2 for MX 3D Series routers.
[edit switch-options] and [edit vlans vlan-name switch-options] hierarchy levels introduced in Junos OS
Release 13.2 for the QFX Series.
RELATED DOCUMENTATION
mac-table-size
IN THIS SECTION
Syntax | 93
Hierarchy Level | 93
Description | 94
Options | 94
Release Information | 94
Syntax
mac-table-size limit {
packet-action drop;
}
Hierarchy Level
[edit switch-options],
[edit vlans vlan-name switch-options]
Description
Modify the size of the MAC address table for the bridge domain or VLAN, a set of bridge domains or
VLANs associated with a trunk port, or a virtual switch. The default is 5120 MAC addresses.
NOTE: For multichassis link aggregation (MC-LAG) peers in active-active mode, configuring the
mac-table-size statement or changing the mac-table-size configuration when traffic is flowing can
cause the MAC entries to be out of synchronization between the two MC-LAG peers, which
might result in flooding. To avoid flooding, you must either halt traffic forwarding and then
configure the mac-table-size statement or use the commit at configuration statement to commit
the changes at the same time in both the peer nodes.
Alternatively, if flooding does occur, you can clear the bridge MAC table on both the routers by
using the clear bridge mac-table command. Running this command ensures that the MAC entries
are re-learned and in synchronization between both the peers.
Options
There is no default MAC address limit for the mac-table-size statement at the [edit switch-options]
hierarchy level. The number of MAC addresses that can be learned is only limited by the platform,
65,535 MAC addresses for EX Series switches and 1,048,575 MAC addresses for other devices.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
[edit switch-options] and [edit vlans vlan-name switch-options] hierarchy levels introduced in Junos OS
Release 12.3R2 for EX Series switches.
Support at the [edit vlans vlan-name switch-options hierarchy level introduced in Junos OS Release 13.2 for
the QFX Series.
RELATED DOCUMENTATION
mac-table-aging-time
IN THIS SECTION
Syntax | 96
Hierarchy Level | 96
Description | 96
Options | 96
Release Information | 97
96
Syntax
mac-table-aging-time time;
Hierarchy Level
NOTE: For MX Series routers, the configuration statement is supported at the [bridge-options],
[protocols vpls], and [protocols evpn] hierarchy levels only.
Description
For MX Series routers, you can use the global-mac-table-aging-time statement at the [edit protocols l2-
learning] hierarchy level to configure the timeout interval at the global level or use the mac-table-aging-time
to configure the timeout interval for a bridge domain or for a specific VPLS or EVPN instance. If multiple
timeout interval values are configured on a router, the router determines the timeout interval value in
the following order of priority:
NOTE: For MX Series routers, the timeout interval configuration feature is supported on routers
with MPCs only.
Options
Release Information
RELATED DOCUMENTATION
no-irb-layer-2-copy
IN THIS SECTION
Syntax | 97
Hierarchy Level | 98
Description | 98
Usage Guidelines | 98
Release Information | 98
Syntax
no-irb-layer-2-copy;
98
Hierarchy Level
[edit bridge-domains],
[edit logical-routers logical-router-name bridge-domains],
[edit routing-instances routing-instance-name bridge-domains]
Description
If you include this statement when using port mirroring with Integrated Routing and Bridging (IRB), then
the packet is mirrored as a Layer 3 packet. By default, the packet is mirrored as a Layer 2 packet. This
statement is also supported if a routing instance is set to type VPLS.
Usage Guidelines
Release Information
RELATED DOCUMENTATION
no-mac-learning
IN THIS SECTION
Syntax | 99
99
ACX Series, MX Series, EX Series with ELS support, M Series, T Series | 100
Description | 100
Default | 101
Syntax
no-mac-learning;
Description
For QFX Series, EX Series switches and SRX Series devices, disables MAC address learning for the
specified VLAN.
101
For QFX Series and EX4600, disable MAC address learning for the specified interface. Disabling MAC
address learning on an interface disables learning for all the VLANs of which that interface is a member.
For EX Series switches’ Q-in-Q interfaces, disables MAC address learning for the specified interface.
Disabling MAC address learning on an interface disables learning for all the VLANs of which that
interface is a member.
For MX Series routers and EX Series switches with ELS support, disables MAC learning for a virtual
switch, for a bridge domain or VLAN, for a specific logical interface in a bridge domain or VLAN, or for a
set of bridge domains or VLANs associated with a Layer 2 trunk port. On platforms that support EVPNs,
you can disable MAC learning on an EVPN.
NOTE: 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.
Default
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or bridge domain configured within a virtual switch.
[edit switch-options], [edit switch-options interface interface-name], [edit vlans vlan-name switch-options], and
[edit vlans vlan-name switch-options interface interface-name] hierarchy levels introduced in Junos OS
Release 12.3 R2 for EX Series switches.
102
Support for EVPNs added in Junos OS Release 13.2 for MX 3D Series routers.
Hierarchy levels [edit switch-options interface interface-name] and [edit vlans vlan-name switch-options]
introduced in Junos OS Release 13.2X50-D10 for EX Series switches.
RELATED DOCUMENTATION
packet-action
IN THIS SECTION
Syntax | 103
Description | 104
Default | 104
Options | 104
Syntax
packet-action action;
Hierarchy Level
Description
Specify the action taken when packets with new source MAC addresses are received after the MAC
address limit is reached. If this statement is not configured, packets with new source MAC addresses are
forwarded by default.
Default
NOTE: On a QFX Series Virtual Chassis, if you include the shutdown option at the [edit vlans vlan-
name switch-options interface interface-name interface-mac-limit packet-action] hierarchy level and
issue the commit operation, the system generates a commit error. The system does not generate
an error if you include the shutdown option at the [edit switch-options interface interface-name
interface-mac-limit packet-action] hierarchy level.
Disabled. The default is for packets for new source MAC addresses to be forwarded after the MAC
address limit is reached.
Options
drop (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Drop packets with new source MAC addresses, and do not learn the
new source MAC addresses.
NOTE: On QFX10000 switches, if you include the drop option, you cannot
configure unicast reverse-path forwarding (URFP) on integrated routing and
bridging (IRB) and MAC limiting on the same interface. If you have an MC-LAG
configuration, you cannot configure MAC limiting on the interchassis link (ICL)
interface.
drop-and- (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
log Evolved is installed) Drop packets with new source MAC addresses, and generate an
alarm, an SNMP trap, or a system log entry.
log (EX Series switches and QFX Series switches) Hold packets with new source MAC
addresses, and generate an alarm, an SNMP trap, or a system log entry.
105
(PTX Series routers in which Junos OS Evolved is installed) Forward packets with the new
source MAC addresses, and generate an alarm, an SNMP trap, and a system log entry
when the MAC limit exceeds the configured value.
none (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Forward packets with new source MAC addresses.
shutdown (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Disable the specified interface, and generate an alarm, an SNMP trap,
or a system log entry.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
Support for EVPNs introduced in Junos OS Release 13.2 on MX Series 5G Universal Routing Platforms.
Support at the [edit switch-options interface interface-name interface-mac-limit limit] hierarchy level and
hierarchy levels under [edit vlans vlan-name] introduced in Junos OS Release 13.2X50-D10 for EX Series
switches and Junos OS Release 13.2 for the QFX Series.
Support for the none option introduced in Junos OS Evolved Release 20.4R1 for PTX Series routers.
Support for the drop, drop-and-log, log, and shutdown options introduced in Junos OS Evolved Release
22.4R1 for PTX Series routers.
106
RELATED DOCUMENTATION
reopen-time
IN THIS SECTION
Syntax | 106
Description | 107
Default | 107
Options | 107
Syntax
reopen-time seconds;
107
Hierarchy Level
Description
(MX Series routers only) Configure the value for the reopen timer.
Default
180 seconds
Options
Release Information
RELATED DOCUMENTATION
routing-interface
IN THIS SECTION
Syntax | 108
108
Description | 108
Options | 108
Syntax
routing-interface routing-interface-name;
Hierarchy Level
Description
(MX Series routers only) Specify a routing interface to include in a bridge domain or a VPLS routing
instance.
When you configure routing-interface irb.x, the VPLS connection comes up, even if no customer edge
(CE) interfaces are configured. This works with one site configured, but not when multiple sites
(multisite) are configured.
Options
routing-interface-name—Name of the routing interface to include in the bridge domain or the VPLS
routing instance. The format of the routing interface name is irb.x, where x is the unit number of the
routing interface you configured at the [edit interfaces irb] hierarchy level. For more information about
how to configure a routing interface, see the Junos OS Network Interfaces Library for Routing Devices.
109
NOTE: You can specify only one routing interface for each bridge domain or VPLS instance.
Release Information
RELATED DOCUMENTATION
service-id
IN THIS SECTION
Syntax | 110
Description | 110
Options | 110
Syntax
service-id number;
Hierarchy Level
Description
Specify a service identifier to include in the packets sent to and from the multichassis link aggregation
(MC-LAG) bridge domain when the VLAN identifier is set to none. This configuration facilitates media
access control (MAC) and Address Resolution Protocol (ARP) synchronization among MC-LAG peers.
NOTE: The VLAN identifier none is supported only for IPv4 traffic.
Options
number—A valid service identifier. You must configure the same service identifier within the bridge
domains of MC-LAG peers.
Release Information
RELATED DOCUMENTATION
static-mac
IN THIS SECTION
Syntax | 111
Description | 112
Options | 112
Syntax
static-mac mac-address;
static-mac mac-address {
vlan-id number;
}
112
Hierarchy Level
Description
Configure a static MAC address for a logical interface in a bridge domain or VLAN.
The vlan-id option can be specified for static-macs only if vlan-id all is configured for the bridging domain
or VLAN.
Options
mac-address—MAC address
Release Information
[edit vlans vlan-name switch-options interface interface name] hierarchy level introduced in Junos OS
Release 12.3R2 for EX Series switches.
Support for EVPNs added in Junos OS Release 13.2 for MX 3D Series routers. The vlan-id option is not
available for EVPNs.
[edit vlans vlan-name switch-options interface interface name] hierarchy level introduced in Junos OS
Release 13.2 for the QFX Series.
RELATED DOCUMENTATION
vlan-id-list
IN THIS SECTION
Syntax | 113
Description | 114
Options | 114
Syntax
vlan-id-list [ vlan-id-numbers ];
114
Hierarchy Level
Description
Specify a VLAN identifier list to use for a bridge domain or VLAN in trunk mode. VLAN identifier list can
be used on C-VLAN interfaces in Q–in–Q tunneling for EX and QFX Series switches.
Specify the trunk option in the interface-mode statement to accept packets with a VLAN ID that matches
the list of VLAN IDs specified in the vlan-id-list statement to forward the packet within the bridge
domain or VLAN configured with the matching VLAN ID. Specify the access option to accept packets
with no VLAN ID to forward the packet within the bridge domain or VLAN configured with the VLAN ID
that matches the VLAN ID specified in the vlan-id statement.
This statement also enables you to bind a logical interface to a list of VLAN IDs, thereby configuring the
logical interface to receive and forward a frame with a tag that matches the specified VLAN ID list.
WARNING: On some EX and QFX Series switches, if VLAN identifier list (vlan-id-list) is
used for Q-in-Q tunnelling, you can apply no more than eight VLAN identifier lists to a
physical interface.
Options
vlan-id-numbers—Valid VLAN identifiers. You can combine individual numbers with range lists by including
a hyphen.
NOTE: On EX Series switches and the QFX Series, the range is 0 through 4094.
115
Release Information
RELATED DOCUMENTATION
vlan-tags
IN THIS SECTION
Syntax | 116
Description | 116
Options | 116
Syntax
Hierarchy Level
Description
Specify dual VLAN identifier tags for a bridge domain, VLAN, or VPLS routing instance.
Options
Release Information
RELATED DOCUMENTATION
Configuring a VLAN
Configuring VLAN Identifiers for Bridge Domains and VPLS Routing Instances
Configuring VLAN Identifiers for VLANs and VPLS Routing Instances
Configuring a Layer 2 Virtual Switch
Configuring a Layer 2 Virtual Switch on an EX Series Switch
118
CHAPTER 6
IN THIS CHAPTER
switch-options | 118
interface-mac-limit | 120
mac-statistics | 123
mac-table-size | 125
no-mac-learning | 128
packet-action | 131
switch-options
IN THIS SECTION
Syntax | 119
Description | 119
Options | 120
Syntax
switch-options {
interface interface-name {
mac-pinning;
mac-learning-priority value packet-action action;
interface-mac-limit limit;
}
interface-mac-limit limit {
packet-action drop;
}
mac-statistics;
mac-table-size limit {
packet-action drop;
}
no-mac-learning;
route-distinguisher (as-number:id | ip-address:id);
service-id number; number;
vrf-target {
community;
auto
import community-name;
export community-name;
}
vrf-import[ policy-names ];
vrf-export[ policy-names ];
}
Hierarchy Level
[edit],
[edit logical-systems logical-system-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name],
[edit routing-instances routing-instance-name]
Description
Configure Layer 2 learning and forwarding properties for a set of bridge domains.
120
Options
Release Information
14.1x53-D10
RELATED DOCUMENTATION
Understanding Layer 2 Learning and Forwarding for Bridge Domains Functioning as Switches with
Layer 2 Trunk Ports
interface-mac-limit
IN THIS SECTION
Syntax | 121
Description | 122
Default | 122
Options | 122
Syntax
interface-mac-limit {
limit
disable;
packet-action ;
}
Hierarchy Level
Description
Configure a limit to the number of MAC addresses that can be learned from a bridge domain, VLAN,
virtual switch, or set of bridge domains or VLANs.
NOTE: For multichassis link aggregation (MC-LAG) peers in active-active mode, configuring the
interface-mac-limit statement or changing the interface-mac-limit configuration when traffic is
flowing can cause the MAC entries to be out of synchronization between the two MC-LAG
peers, which might result in flooding. To avoid flooding, you must either halt traffic forwarding
and then configure the interface-mac-limit statement or use the commit at configuration
statement to commit the changes at the same time in both the peer nodes.
Alternatively, if flooding does occur, you can clear the bridge MAC table on both the routers or
switches by using the clear bridge mac-table command. Running this command ensures that the
MAC entries are re-learned and in synchronization between both the peers.
Default
Options
disable—Disables the global interface-mac-limit configuration on an interface and sets the maximum
interface-mac-limit that is permitted on the device.
• Range: 1 through <default MAC limit> MAC addresses per interface. Range is platform specific.
If you configure both disable and limit, disable takes precedence and packet-action is set to none. The
remaining statement is explained separately.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
[edit switch-options], [edit switch-options interface interface-name], [edit vlans vlan-name switch-
options], and [edit vlans vlan-name switch-options interface interface-name] hierarchy levels introduced
in Junos OS Release 12.3R2 for EX Series switches.
RELATED DOCUMENTATION
mac-statistics
IN THIS SECTION
Syntax | 123
Description | 124
Default | 124
Syntax
mac-statistics;
124
Hierarchy Level
Description
(MX Series routers, EX Series switches, and QFX Series only) For bridge domains or VLANs, enable MAC
accounting either for a specific bridge domain or VLAN, or for a set of bridge domains or VLANs
associated with a Layer 2 trunk port.
Default
disabled
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
[edit switch-options] and [edit vlans vlan-name switch-options] hierarchy levels introduced in Junos OS
Release 12.3R2 for EX Series switches.
Support for EVPNs added in Junos OS Release 13.2 for MX 3D Series routers.
[edit switch-options] and [edit vlans vlan-name switch-options] hierarchy levels introduced in Junos OS
Release 13.2 for the QFX Series.
RELATED DOCUMENTATION
mac-table-size
IN THIS SECTION
Syntax | 126
Description | 126
Options | 127
Syntax
mac-table-size limit {
packet-action drop;
}
Hierarchy Level
Description
Modify the size of the MAC address table for the bridge domain or VLAN, a set of bridge domains or
VLANs associated with a trunk port, or a virtual switch. The default is 5120 MAC addresses.
NOTE: For multichassis link aggregation (MC-LAG) peers in active-active mode, configuring the
mac-table-size statement or changing the mac-table-size configuration when traffic is flowing can
cause the MAC entries to be out of synchronization between the two MC-LAG peers, which
might result in flooding. To avoid flooding, you must either halt traffic forwarding and then
configure the mac-table-size statement or use the commit at configuration statement to commit
the changes at the same time in both the peer nodes.
Alternatively, if flooding does occur, you can clear the bridge MAC table on both the routers by
using the clear bridge mac-table command. Running this command ensures that the MAC entries
are re-learned and in synchronization between both the peers.
127
Options
There is no default MAC address limit for the mac-table-size statement at the [edit switch-options]
hierarchy level. The number of MAC addresses that can be learned is only limited by the platform,
65,535 MAC addresses for EX Series switches and 1,048,575 MAC addresses for other devices.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
[edit switch-options] and [edit vlans vlan-name switch-options] hierarchy levels introduced in Junos OS
Release 12.3R2 for EX Series switches.
Support at the [edit vlans vlan-name switch-options hierarchy level introduced in Junos OS Release 13.2 for
the QFX Series.
RELATED DOCUMENTATION
Layer 2 Learning and Forwarding for VLANs Acting as a Switch for a Layer 2 Trunk Port
no-mac-learning
IN THIS SECTION
Syntax | 128
ACX Series, MX Series, EX Series with ELS support, M Series, T Series | 129
Description | 130
Default | 130
Syntax
no-mac-learning;
Description
For QFX Series, EX Series switches and SRX Series devices, disables MAC address learning for the
specified VLAN.
For QFX Series and EX4600, disable MAC address learning for the specified interface. Disabling MAC
address learning on an interface disables learning for all the VLANs of which that interface is a member.
For EX Series switches’ Q-in-Q interfaces, disables MAC address learning for the specified interface.
Disabling MAC address learning on an interface disables learning for all the VLANs of which that
interface is a member.
For MX Series routers and EX Series switches with ELS support, disables MAC learning for a virtual
switch, for a bridge domain or VLAN, for a specific logical interface in a bridge domain or VLAN, or for a
set of bridge domains or VLANs associated with a Layer 2 trunk port. On platforms that support EVPNs,
you can disable MAC learning on an EVPN.
NOTE: 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.
Default
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or bridge domain configured within a virtual switch.
[edit switch-options], [edit switch-options interface interface-name], [edit vlans vlan-name switch-options], and
[edit vlans vlan-name switch-options interface interface-name] hierarchy levels introduced in Junos OS
Release 12.3 R2 for EX Series switches.
Support for EVPNs added in Junos OS Release 13.2 for MX 3D Series routers.
Hierarchy levels [edit switch-options interface interface-name] and [edit vlans vlan-name switch-options]
introduced in Junos OS Release 13.2X50-D10 for EX Series switches.
RELATED DOCUMENTATION
packet-action
IN THIS SECTION
Syntax | 132
Description | 133
Default | 133
132
Options | 133
Syntax
packet-action action;
Hierarchy Level
limit limit],
[edit routing-instances routing-instance-name switch-options interface-mac-limit limit],
[edit switch-options interface-mac-limit limit],
[edit switch-options mac-table-size limit],
[edit switch-options interface interface-name interface-mac-limit limit],
[edit vlans vlan-name switch-options mac-table-size limit][edit vlans vlan-name switch-options
interface-mac-limit limit],
[edit vlans vlan-name switch-options interface interface-name interface-mac-limit limit]
Description
Specify the action taken when packets with new source MAC addresses are received after the MAC
address limit is reached. If this statement is not configured, packets with new source MAC addresses are
forwarded by default.
Default
NOTE: On a QFX Series Virtual Chassis, if you include the shutdown option at the [edit vlans vlan-
name switch-options interface interface-name interface-mac-limit packet-action] hierarchy level and
issue the commit operation, the system generates a commit error. The system does not generate
an error if you include the shutdown option at the [edit switch-options interface interface-name
interface-mac-limit packet-action] hierarchy level.
Disabled. The default is for packets for new source MAC addresses to be forwarded after the MAC
address limit is reached.
Options
drop (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Drop packets with new source MAC addresses, and do not learn the
new source MAC addresses.
134
NOTE: On QFX10000 switches, if you include the drop option, you cannot
configure unicast reverse-path forwarding (URFP) on integrated routing and
bridging (IRB) and MAC limiting on the same interface. If you have an MC-LAG
configuration, you cannot configure MAC limiting on the interchassis link (ICL)
interface.
drop-and- (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
log Evolved is installed) Drop packets with new source MAC addresses, and generate an
alarm, an SNMP trap, or a system log entry.
log (EX Series switches and QFX Series switches) Hold packets with new source MAC
addresses, and generate an alarm, an SNMP trap, or a system log entry.
(PTX Series routers in which Junos OS Evolved is installed) Forward packets with the new
source MAC addresses, and generate an alarm, an SNMP trap, and a system log entry
when the MAC limit exceeds the configured value.
none (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Forward packets with new source MAC addresses.
shutdown (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Disable the specified interface, and generate an alarm, an SNMP trap,
or a system log entry.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
Support for EVPNs introduced in Junos OS Release 13.2 on MX Series 5G Universal Routing Platforms.
Support at the [edit switch-options interface interface-name interface-mac-limit limit] hierarchy level and
hierarchy levels under [edit vlans vlan-name] introduced in Junos OS Release 13.2X50-D10 for EX Series
switches and Junos OS Release 13.2 for the QFX Series.
Support for the none option introduced in Junos OS Evolved Release 20.4R1 for PTX Series routers.
Support for the drop, drop-and-log, log, and shutdown options introduced in Junos OS Evolved Release
22.4R1 for PTX Series routers.
RELATED DOCUMENTATION
CHAPTER 7
IN THIS CHAPTER
mac-learning-priority | 136
l2-learning | 138
global-mac-limit | 140
global-mac-move | 142
global-mac-statistics | 143
global-mac-table-aging-time | 145
global-no-mac-learning | 147
interface-mac-limit | 148
notification-time | 151
packet-action | 152
threshold-count | 156
threshold-time | 158
mac-learning-priority
IN THIS SECTION
Syntax | 137
Description | 137
Options | 137
Syntax
Hierarchy Level
[edit switch-options]
Description
Configure MAC learning priority on the interfaces so that MAC addresses are always learnt on the high
priority interface.
Options
• Default: 4
• Action: discard
• Default: Forward
Release Information
l2-learning
IN THIS SECTION
Description | 139
Options | 139
l2-learning {
global-le-bridge-domain-aging-time;
global-mac-ip-limit number;
global-mac-ip-table-aging-time seconds;
global-mac-limit limit;
global-mac-statistics;
global-mac-table-aging-time seconds;
global-no-mac-learning;
global-mac-move;
}
l2-learning {
global-mac-limit limit {
139
packet-action-drop
}
global-mac-table-aging-time seconds;
global-mode (switching | transparent-bridge) ;
global-no-mac-learning;
}
Hierarchy Level
[edit protocols]
Description
Options
global-le- Specify the aging time of LE bridge-domain. The MAC address is learnt after next
bridge-domain- hop(NH) and bridge-domain(BD), also called NHBD. This aging time delays the
aging-time
deletion of NHBD. Configuring lesser time, in seconds, results in faster deletion of
NHBD.
Release Information
Statement modified in Junos OS Release 9.5. Support for global mode added in Junos OS Release
15.1X49-D40.
RELATED DOCUMENTATION
global-mac-limit
IN THIS SECTION
Syntax | 140
Description | 141
Default | 141
Options | 141
Syntax
global-mac-limit limit {
packet-action drop;
}
141
Hierarchy Level
Description
(MX Series routers and EX Series switches only) Limit the number of media access control (MAC)
addresses learned from the logical interfaces on the router or switch.
Default
Options
Release Information
RELATED DOCUMENTATION
Limiting the Number of MAC Addresses Learned from Each Logical Interface
142
global-mac-move
IN THIS SECTION
Syntax | 142
Description | 142
Default | 143
Syntax
global-mac-move {
cooloff-time seconds;
disable-action;
exclusive-mac virtual-mac-mac-address/mask;
interface-recovery-time seconds;
notification-time seconds;
reopen-time seconds;
statistical-approach-wait-time seconds;
threshold-count count;
threshold-time seconds;
virtual-mac mac-address /mask;
}
Hierarchy Level
Description
Set parameters for media access control (MAC) address move reporting.
143
Default
By default, MAC moves notify every second, with a threshold time of 1 second and a threshold count
of 50.
Release Information
RELATED DOCUMENTATION
global-mac-statistics
IN THIS SECTION
Syntax | 144
Description | 144
Default | 144
Options | 144
Syntax
global-mac-statistics;
Hierarchy Level
Description
(MX Series routers and EX Series switches only) Enable MAC accounting for the entire router or switch.
Default
disabled
Options
Release Information
RELATED DOCUMENTATION
global-mac-table-aging-time
IN THIS SECTION
Syntax | 145
Description | 145
Default | 146
Options | 146
Syntax
global-mac-table-aging-time seconds;
Hierarchy Level
Description
NOTE: The global-mac-table-aging-time statement appears in the Junos OS CLI for devices that
support the Enhanced Layer 2 Software (ELS) configuration style. If your device runs software
that does not support ELS, use the mac-table-aging-time statement, which appears in the [edit
ethernet-switching-options] and the [edit vlans] hierarchies. For ELS details, see Using the Enhanced
Layer 2 Software CLI.
Default
300 seconds
Options
seconds—Time elapsed before MAC table entries are timed out and entries are deleted from the table.
• Range: For MX Series routers: 10 through 1 million; for EX Series and QFX Series switches: 60
through 1 million; for SRX devices: 10 through 64,000 seconds
Release Information
RELATED DOCUMENTATION
global-no-mac-learning
IN THIS SECTION
Syntax | 147
Description | 147
Default | 147
Syntax
global-no-mac-learning;
Hierarchy Level
Description
Default
Release Information
RELATED DOCUMENTATION
interface-mac-limit
IN THIS SECTION
Syntax | 148
Description | 149
Default | 150
Options | 150
Syntax
interface-mac-limit {
limit
disable;
packet-action ;
}
149
Hierarchy Level
Description
Configure a limit to the number of MAC addresses that can be learned from a bridge domain, VLAN,
virtual switch, or set of bridge domains or VLANs.
NOTE: For multichassis link aggregation (MC-LAG) peers in active-active mode, configuring the
interface-mac-limit statement or changing the interface-mac-limit configuration when traffic is
flowing can cause the MAC entries to be out of synchronization between the two MC-LAG
peers, which might result in flooding. To avoid flooding, you must either halt traffic forwarding
and then configure the interface-mac-limit statement or use the commit at configuration
statement to commit the changes at the same time in both the peer nodes.
150
Alternatively, if flooding does occur, you can clear the bridge MAC table on both the routers or
switches by using the clear bridge mac-table command. Running this command ensures that the
MAC entries are re-learned and in synchronization between both the peers.
Default
Options
disable—Disables the global interface-mac-limit configuration on an interface and sets the maximum
interface-mac-limit that is permitted on the device.
• Range: 1 through <default MAC limit> MAC addresses per interface. Range is platform specific.
If you configure both disable and limit, disable takes precedence and packet-action is set to none. The
remaining statement is explained separately.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
[edit switch-options], [edit switch-options interface interface-name], [edit vlans vlan-name switch-
options], and [edit vlans vlan-name switch-options interface interface-name] hierarchy levels introduced
in Junos OS Release 12.3R2 for EX Series switches.
151
RELATED DOCUMENTATION
notification-time
IN THIS SECTION
Syntax | 151
Description | 151
Default | 152
Options | 152
Syntax
notification-time seconds;
Hierarchy Level
Description
(MX Series routers only) Configure the notification time value for MAC move reports that a MAC
address moves before counting against the threshold values.
152
Default
1 second
Options
Release Information
RELATED DOCUMENTATION
packet-action
IN THIS SECTION
Syntax | 153
Description | 154
Default | 154
Options | 154
Syntax
packet-action action;
Hierarchy Level
Description
Specify the action taken when packets with new source MAC addresses are received after the MAC
address limit is reached. If this statement is not configured, packets with new source MAC addresses are
forwarded by default.
Default
NOTE: On a QFX Series Virtual Chassis, if you include the shutdown option at the [edit vlans vlan-
name switch-options interface interface-name interface-mac-limit packet-action] hierarchy level and
issue the commit operation, the system generates a commit error. The system does not generate
an error if you include the shutdown option at the [edit switch-options interface interface-name
interface-mac-limit packet-action] hierarchy level.
Disabled. The default is for packets for new source MAC addresses to be forwarded after the MAC
address limit is reached.
Options
drop (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Drop packets with new source MAC addresses, and do not learn the
new source MAC addresses.
NOTE: On QFX10000 switches, if you include the drop option, you cannot
configure unicast reverse-path forwarding (URFP) on integrated routing and
bridging (IRB) and MAC limiting on the same interface. If you have an MC-LAG
configuration, you cannot configure MAC limiting on the interchassis link (ICL)
interface.
drop-and- (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
log Evolved is installed) Drop packets with new source MAC addresses, and generate an
alarm, an SNMP trap, or a system log entry.
log (EX Series switches and QFX Series switches) Hold packets with new source MAC
addresses, and generate an alarm, an SNMP trap, or a system log entry.
155
(PTX Series routers in which Junos OS Evolved is installed) Forward packets with the new
source MAC addresses, and generate an alarm, an SNMP trap, and a system log entry
when the MAC limit exceeds the configured value.
none (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Forward packets with new source MAC addresses.
shutdown (EX Series switches, QFX Series switches, and PTX Series routers in which Junos OS
Evolved is installed) Disable the specified interface, and generate an alarm, an SNMP trap,
or a system log entry.
Release Information
Support for top-level configuration for the virtual-switch type of routing instance added in Junos OS
Release 9.2. In Junos OS Release 9.1 and earlier, the routing instances hierarchy supported this
statement only for a VPLS instance or a bridge domain configured within a virtual switch.
Support for EVPNs introduced in Junos OS Release 13.2 on MX Series 5G Universal Routing Platforms.
Support at the [edit switch-options interface interface-name interface-mac-limit limit] hierarchy level and
hierarchy levels under [edit vlans vlan-name] introduced in Junos OS Release 13.2X50-D10 for EX Series
switches and Junos OS Release 13.2 for the QFX Series.
Support for the none option introduced in Junos OS Evolved Release 20.4R1 for PTX Series routers.
Support for the drop, drop-and-log, log, and shutdown options introduced in Junos OS Evolved Release
22.4R1 for PTX Series routers.
156
RELATED DOCUMENTATION
threshold-count
IN THIS SECTION
Syntax | 156
Description | 157
Default | 157
Options | 157
Syntax
threshold-count count;
157
Hierarchy Level
Description
(MX Series routers only) Configure the threshold count value for MAC move reports.
Default
50
Options
count—Number of MAC moves needed in the notification time to generate a MAC move report.
Release Information
RELATED DOCUMENTATION
threshold-time
IN THIS SECTION
Syntax | 158
Description | 158
Default | 158
Options | 158
Syntax
threshold-time seconds;
Hierarchy Level
Description
(MX Series routers only) Configure the threshold time value for MAC move reports when the MAC
address moves at least a specified number of times (threshold count) in the configured interval.
Default
1 second
Options
Release Information
RELATED DOCUMENTATION
Operational Commands
CHAPTER 8
IN THIS CHAPTER
IN THIS SECTION
Syntax | 162
Description | 162
Options | 162
Syntax
Description
Options
active (Optional) Unblock the interfaces that were blocked by the MAC move action feature. This
allows the user to keep the reopen-time configured to a large value, but when the looping error is
fixed, the user can manually release the blocking.
clear
Output Fields
When you enter this command, the MAC move buffer entries are deleted.
Sample Output
Release Information
IN THIS SECTION
Syntax | 163
Description | 163
Options | 163
Syntax
Description
Options
view
164
Output Fields
Table 5 on page 164 describes the output fields for the show l2-learning global-information command.
Output fields are listed in the approximate order in which they appear.
MAC aging interval Configured timeout interval, in seconds, for all MAC table entries.
MAC limit Count Configured maximum limit on the number of MAC addresses that can be learned.
MAC limit hit flag Status of the learned MAC limit hit flag: Enabled (the learned MAC exceeds the global
MAC limit) or Disabled (the learned MAC does not exceed the global MAC limit).
MAC packet action Status of action to drop packets after the configured MAC address limit is reached:
drop Enabled (packets are dropped) or Disabled (packets are forwarded).
Sample Output
Release Information
IN THIS SECTION
Syntax | 165
Description | 165
Options | 165
Syntax
Description
(MX Series routers only) Display the total number of dynamic and static MAC addresses learned for the
entire router.
Options
view
166
Output Fields
Displays the total number of dynamic and static MAC addresses learned for the entire router.
Sample Output
Release Information
IN THIS SECTION
Syntax | 166
Description | 167
Options | 167
Syntax
Description
Display Layer 2 learning properties for all the configured routing instances.
Options
view
Output Fields
Table 6 on page 167 describes the output fields for the show l2-learning instance command. Output fields
are listed in the approximate order in which they appear.
On MX Series routers you can use the show l2-learning instance <extensive> command
option to display the Bridge Service-id information which includes the Config Service ID and
the Active Service ID.
Routing instance Status of Layer 2 learning properties for each routing instance:
flags
• DL—MAC learning is disabled.
• LH—The maximum number of MAC addresses has been learned on the routing instance.
The routing instance is not able to learn any additional MAC addresses.
MAC limit Maximum number of MAC addresses that can be learned from each interface in the routing
instance or bridging domain.
Sample Output
Release Information
IN THIS SECTION
Syntax | 169
Description | 169
Options | 169
Syntax
Description
(MX Series routers only) Display Layer 2 learning information for all the interfaces.
Options
view
Output Fields
Table 7 on page 170 describes the output fields for the show l2-learning interface command. Output fields
are listed in the approximate order in which they appear.
170
Routing Instance Number of the routing instance to which the interface belongs.
Interface device Value of the order in which the Junos OS finds and initializes the interface.
Logical interface flags Status of Layer 2 learning properties for each interface:
• MAC limit—Maximum number of MAC addresses that can be learned from the
interface.
Sample Output
show l2 learning-interface
Release Information
Added sample output to indicate an EVPN MAC Pinned interface, introduced in Junos OS 16.2R1.
IN THIS SECTION
Syntax | 172
Description | 172
Options | 172
Syntax
Description
(MX Series routers only) Display action as a result of configuring the MAC address move feature.
Options
view
Output Fields
Sample Output
Release Information
CHAPTER 9
IN THIS CHAPTER
IN THIS SECTION
Syntax | 175
Description | 175
Options | 175
Syntax
Description
(MX Series routers only) Clear learned Layer 2 address information from the media access control (MAC)
address table.
Options
none Clear all learned Layer 2 address information from the MAC address table.
bridge-domain (all | (Optional) Clear learned Layer 2 MAC addresses for all bridging domains or
bridge-domain-name) for the specified bridging domain.
instance instance-name (Optional) Clear learned Layer 2 MAC addresses for the specified routing
instance.
interface interface-name (Optional) Clear learned Layer 2 MAC addresses for the specified interface.
learning-vlan-id (all-vlan | (Optional) Clears learned Layer 2 MAC addresses for all VLANs or for the
learning-vlan-id) specified VLAN.
mac-address (Optional) Clear the specified learned Layer 2 address from the MAC
address table.
clear
Output Fields
When you enter this command, you are provided feedback on the status of your request.
176
Sample Output
Release Information
IN THIS SECTION
Syntax | 176
Description | 176
Options | 177
Syntax
Description
Clear learned media access control (MAC) addresses from the hardware and MAC database for Gigabit
Ethernet IQ2 interfaces or aggregated Ethernet interfaces. Static MAC addresses configured by the
operator are not cleared.
177
Options
interface-name Name of a physical or logical interface. When you clear a physical interface, all
learned MAC addresses on all the logical interfaces under the physical interface
are cleared.
view
Output Fields
Sample Output
Release Information
Support for statement with the aex option introduced in Junos OS Release 15.1.
IN THIS SECTION
Syntax | 178
178
Description | 178
Options | 178
Syntax
Description
Clear statistics that are collected for every MAC address, including policer statistics, on a physical or
logical interface or all interfaces.
Options
(interface-name | all) Clear MAC database statistics for the specified physical or logical gigabit or 10-
Gigabit Ethernet interface. Specify all to clear the MAC database statistics for all
interfaces.
view
Output Fields
Sample Output
Release Information
IN THIS SECTION
Syntax | 179
Description | 179
Options | 180
Syntax
Description
Options
bridge-domain (all | domain- (Optional) Display information about all bridge domains or the
name) specified bridge domain.
instance instance-name (Optional) Display information for the specified routing instance.
view
Sample Output
Release Information
IN THIS SECTION
Syntax | 182
Description | 182
Options | 182
Syntax
Description
Options
none Display all bridging flooding information for all bridging domains.
bridge-domain domain- (Optional) Display bridging flooding information for the specified bridge
name domain.
instance instance-name (Optional) Display bridging flooding information for the specified routing
instance.
• all-ve-flood—Display the route for flooding traffic to all VPLS edge routers
if no-local-switching is enabled.
view
Output Fields
to be provided
Sample Output
CEs: 6
VEs: 0
Flood Routes:
Prefix Type Owner NhType NhIndex
0x35/16 ALL_FLOOD __vs1+vlan100__ flood 425
0x35/16 RE_FLOOD __vs1+vlan100__ flood 425
0x3780/17 ALT_ROOT_RT ge-11/0/3.0 flood 425
0x3b80/17 ALT_ROOT_RT ge-11/1/4.100 flood 425
0x3c80/17 ALT_ROOT_RT ge-11/1/1.100 flood 425
0x3d80/17 ALT_ROOT_RT ge-11/1/0.100 flood 425
0x3e80/17 ALT_ROOT_RT xe-10/2/0.100 flood 425
0x3f80/17 ALT_ROOT_RT xe-10/0/0.100 flood 425
Name: vs1::vlan200
CEs: 5
VEs: 0
Flood Routes:
Prefix Type Owner NhType NhIndex
0x39/16 ALL_FLOOD __vs1+vlan200__ flood 427
0x39/16 RE_FLOOD __vs1+vlan200__ flood 427
0x4180/17 ALT_ROOT_RT ge-11/1/0.200 flood 427
0x4080/17 ALT_ROOT_RT ge-11/1/1.200 flood 427
0x4280/17 ALT_ROOT_RT ge-11/1/4.200 flood 427
0x4480/17 ALT_ROOT_RT xe-10/0/0.200 flood 427
0x4380/17 ALT_ROOT_RT xe-10/2/0.200 flood 427
ge-11/1/1.100 CE
ge-11/1/0.100 CE
xe-10/2/0.100 CE
xe-10/0/0.100 CE
ge-11/1/0.100 CE
xe-10/2/0.100 CE
xe-10/0/0.100 CE
xe-10/2/0.100 CE
xe-10/0/0.100 CE
Name: vs1::vlan200
CEs: 5
VEs: 0
xe-10/2/0.200 CE
Release Information
IN THIS SECTION
Syntax | 191
Description | 192
Options | 192
Syntax
<global-count>
<instance instance-name>
<interface interface-name>
<mac-address>
<instance instance-name>
<vlan-id (all-vlan | vlan-id)>
Description
Options
global-count (Optional) Display the total number of learned Layer 2 MAC addresses on
the system.
instance instance-name (Optional) Display learned Layer 2 MAC addresses for the specified routing
instance.
interface interface-name (Optional) Display learned Layer 2 MAC addresses for the specified
interface.
mac-address (Optional) Display the specified learned Layer 2 MAC address information.
vlan-id (all-vlan | vlan-id) (Optional) Display learned Layer 2 MAC addresses for all VLANs or for the
specified VLAN.
Additional Information
When Layer 2 protocol tunneling is enabled, the tunneling MAC address 01:00:0c:cd:cd:d0 is installed in
the MAC table. When the Cisco Discovery Protocol (CDP), Spanning Tree Protocol (STP), or VLAN Trunk
Protocol (VTP) is configured for Layer 2 protocol tunneling on an interface, the corresponding protocol
MAC address is installed in the MAC table.
193
view
Output Fields
Table 8 on page 193 describes the output fields for the show bridge mac-table command. Output fields are
listed in the approximate order in which they appear.
MAC flags Status of MAC address learning properties for each interface:
• NM—Non-configured MAC.
MAC count Number of MAC addresses learned on the specific routing instance or interface.
Learning interface Name of the logical interface on which the MAC address was learned.
Learning VLAN VLAN ID of the routing instance or bridge domain in which the MAC address was
learned.
Layer 2 flags Debugging flags signifying that the MAC address is present in various lists.
Epoch Spanning Tree Protocol epoch number identifying when the MAC address was
learned. Used for debugging.
Sequence number Sequence number assigned to this MAC address. Used for debugging.
Learning mask Mask of the Packet Forwarding Engines where this MAC address was learned. Used
for debugging.
IPC generation Creation time of the logical interface when this MAC address was learned. Used for
debugging.
Sample Output
Release Information
IN THIS SECTION
Syntax | 199
Description | 199
Options | 199
Syntax
Description
Options
none Display bridge statistics for all bridge domains in all routing instances.
bridge-domain domain-name (Optional) Display statistics for the specified bridge domain.
instance instance-name (Optional) Display statistics for the specified routing instance.
view
200
Sample Output
Flooded bytes : 0
Unicast packets : 0
Unicast bytes : 0
Current MAC count: 0 (Limit 1024)
Local interface: xe-10/2/0.200, Index: 94
Broadcast packets: 4
Broadcast bytes : 260
Multicast packets: 0
Multicast bytes : 0
Flooded packets : 0
Flooded bytes : 0
Unicast packets : 0
Unicast bytes : 0
Current MAC count: 0 (Limit 1024)
Release Information