Layer 2 Bridging or VLANs · Topic 1 of 4
MX Bridging Elements and Frame Processing
Learn MX Series bridging for the JNCIS-SP JN0-364: bridge domains, the default switch, MAC learning, flooding, filtering and aging, and both config styles.
- 5 min
- MX Layer 2 uses bridge domains; EX and QFX ELS use
vlans. - Bridge domains at
[edit bridge-domains]belong to thedefault-switchinstance. - Frame processing: learn, forward, flood, filter, age.
What it is
A service provider edge often needs Layer 2 and Layer 3 on the same box: bridging customer VLANs, stacking provider tags and routing between them. The MX Series routers do this in the Packet Forwarding Engine, using bridge domains instead of the vlans stanza found on EX and QFX switches.
A bridge domain is a set of logical interfaces that share one broadcast domain and one MAC table. It plays the role a VLAN plays on a switch, and the MX learns and forwards frames inside it exactly as a transparent bridge does.
How it works
Service provider switching platforms
| Platform | Layer 2 configuration style | Notes for this exam |
|---|---|---|
| MX Series | bridge-domains, family bridge, routing-instances of type virtual-switch | The platform this exam uses; bridges, routes and runs MPLS on one chassis |
| EX and QFX Series (ELS) | vlans, family ethernet-switching, l3-interface | Enterprise and data center switching; mention only as the equivalent |
On the MX, Layer 2 learning and forwarding run in the Packet Forwarding Engine. The Layer 2 control protocols such as spanning tree run in the l2cpd process on the Routing Engine.
Bridging terminology
| Term | Meaning on the MX |
|---|---|
| Bridge domain | A Layer 2 broadcast domain with its own MAC table, usually tied to one VLAN ID |
| Logical interface | An interface unit, such as ge-1/0/0.0, that is placed in a bridge domain |
| default-switch | The built-in Layer 2 instance that holds bridge domains configured at [edit bridge-domains] |
| Virtual switch | A routing instance of type virtual-switch with its own bridge domains, MAC tables and spanning tree |
| Normalized VLAN | The VLAN ID set in the bridge domain; frames are rewritten to it on the way in and from it on the way out |
| IRB | The irb interface that gives a bridge domain a Layer 3 gateway |
| Learning domain | The scope in which MAC addresses are learned, normally one per bridge domain |
Two ways to attach interfaces
The MX accepts two configuration styles, and the exam shows both.
| Enterprise style | Service provider style | |
|---|---|---|
| Interface unit | family bridge with interface-mode access or trunk | encapsulation vlan-bridge with a vlan-id per unit |
| Physical interface | No tagging statement needed for access or trunk | vlan-tagging or flexible-vlan-tagging, and encapsulation flexible-ethernet-services |
| Bridge domain membership | Automatic, by matching the bridge domain vlan-id | Explicit interface ge-1/0/0.100 in the bridge domain |
| Best for | Simple access and trunk ports | Per-VLAN units, tag translation and Q-in-Q |
Frame processing
Every frame that arrives on a bridged interface goes through the same steps.
- Learning. The source MAC address and the incoming logical interface are recorded in the bridge domain's MAC table.
- Forwarding. If the destination MAC is in the table, the frame goes out of that one interface only.
- Flooding. Broadcast, unknown unicast and multicast frames (BUM traffic) are sent out of every other interface in the bridge domain.
- Filtering. If the destination MAC was learned on the interface the frame came in on, the frame is dropped.
- Aging. An entry not refreshed by new frames is removed after the aging time, 300 seconds by default on the MX.
Flooding never leaves the bridge domain. Two bridge domains are separate broadcast domains, so traffic between them must be routed, normally through IRB.
Monitoring the MAC table
user@mx> show bridge domain
user@mx> show bridge mac-table
user@mx> show bridge mac-table bridge-domain BD-100
user@mx> show l2-learning global-information
user@mx> clear bridge mac-table
show bridge domain lists each bridge domain, its routing instance, VLAN ID and member interfaces. show bridge mac-table lists learned MAC addresses with their logical interface. show l2-learning global-information shows global settings such as the MAC aging interval.
To change the aging time on the MX:
user@mx# set protocols l2-learning global-mac-table-aging-time 600
When a host cannot be reached inside one bridge domain, check show bridge mac-table first. If the host's MAC is missing, the problem is the Layer 2 path to it: interface state, VLAN membership or spanning tree blocking.
Common mistakes
Writing EX syntax for the MX. set vlans and family ethernet-switching are the ELS switch forms. On the MX you configure bridge-domains and family bridge.
Thinking a router never floods. In a bridge domain the MX behaves as a bridge and floods BUM traffic to all other members.
Confusing filtering with security filtering. In bridging, filtering means dropping a frame whose destination is on the incoming interface, not applying a firewall filter.
MAC addresses learned in one bridge domain do not help another. The same MAC address can appear in two bridge domains, each with its own entry.
What to remember for the exam
- MX Layer 2 uses bridge domains; EX and QFX ELS use
vlans. - Bridge domains at
[edit bridge-domains]belong to thedefault-switchinstance. - Frame processing: learn, forward, flood, filter, age.
- BUM traffic is flooded within the bridge domain only.
- Default MAC aging on the MX is 300 seconds; change it with
global-mac-table-aging-time. - Enterprise style uses
family bridge interface-mode; service provider style usesencapsulation vlan-bridgeand explicit bridge domain interfaces. show bridge mac-tableandshow bridge domainare the main checks.
Check yourself
An MX receives a frame whose destination MAC is not in the bridge domain's MAC table. What does it do?
It floods the frame out of every other interface in that bridge domain.
What is the default MAC aging time on an MX Series router?
300 seconds, set with
global-mac-table-aging-timeunderprotocols l2-learning.Which instance holds bridge domains configured at the top-level
[edit bridge-domains]hierarchy?The built-in
default-switchinstance.
Topic 1 of 4 in Layer 2 Bridging or VLANs
Test yourself on Layer 2 Bridging or VLANs
The full Juniper JNCIS-SP JN0-364 question bank has 860 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.