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
In a nutshell
  • MX Layer 2 uses bridge domains; EX and QFX ELS use vlans.
  • Bridge domains at [edit bridge-domains] belong to the default-switch instance.
  • 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.

Frame inlearn source MACMAC tabledestination knownForward to one interfaceMAC tabledestination unknown or broadcastFlood to all other interfaces in the bridge domain

How it works

Service provider switching platforms

PlatformLayer 2 configuration styleNotes for this exam
MX Seriesbridge-domains, family bridge, routing-instances of type virtual-switchThe platform this exam uses; bridges, routes and runs MPLS on one chassis
EX and QFX Series (ELS)vlans, family ethernet-switching, l3-interfaceEnterprise 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

TermMeaning on the MX
Bridge domainA Layer 2 broadcast domain with its own MAC table, usually tied to one VLAN ID
Logical interfaceAn interface unit, such as ge-1/0/0.0, that is placed in a bridge domain
default-switchThe built-in Layer 2 instance that holds bridge domains configured at [edit bridge-domains]
Virtual switchA routing instance of type virtual-switch with its own bridge domains, MAC tables and spanning tree
Normalized VLANThe VLAN ID set in the bridge domain; frames are rewritten to it on the way in and from it on the way out
IRBThe irb interface that gives a bridge domain a Layer 3 gateway
Learning domainThe 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 styleService provider style
Interface unitfamily bridge with interface-mode access or trunkencapsulation vlan-bridge with a vlan-id per unit
Physical interfaceNo tagging statement needed for access or trunkvlan-tagging or flexible-vlan-tagging, and encapsulation flexible-ethernet-services
Bridge domain membershipAutomatic, by matching the bridge domain vlan-idExplicit interface ge-1/0/0.100 in the bridge domain
Best forSimple access and trunk portsPer-VLAN units, tag translation and Q-in-Q

Frame processing

Every frame that arrives on a bridged interface goes through the same steps.

  1. Learning. The source MAC address and the incoming logical interface are recorded in the bridge domain's MAC table.
  2. Forwarding. If the destination MAC is in the table, the frame goes out of that one interface only.
  3. Flooding. Broadcast, unknown unicast and multicast frames (BUM traffic) are sent out of every other interface in the bridge domain.
  4. Filtering. If the destination MAC was learned on the interface the frame came in on, the frame is dropped.
  5. 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.

Unknown destinationfloodAll ports in the bridge domainreply from hostSource learnednext frameForwarded to one port

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
Exam tip

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.

Watch out

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 the default-switch instance.
  • 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 uses encapsulation vlan-bridge and explicit bridge domain interfaces.
  • show bridge mac-table and show bridge domain are 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-time under protocols l2-learning.

  • Which instance holds bridge domains configured at the top-level [edit bridge-domains] hierarchy?

    The built-in default-switch instance.

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.