ON THIS PAGE
Example: Configuring the MAC Address of an IRB Interface
This example shows how to configure the media access control (MAC) address of an integrated routing and bridging (IRB) interface for devices with Modular Port Concentrator (MPC) cards . An IRB interface is a Layer 3 routing interface that is used in a bridge domain or virtual private LAN service (VPLS) routing.
Requirements
This example requires the following hardware and software components:
MX Series routers with MPC cards.
Junos OS Release 13.2 or later running on all devices.
Overview
Junos OS Release 13.2 and later support the assignment of MAC addresses to IRB logical interfaces. The IRB logical interfaces provide support for simultaneous Layer 2 bridging and Layer 3 routing within the same bridge domain. Packets that arrive on an interface of the bridge domain are either switched or routed, based on the destination MAC address of the packet. The packets with the router’s Layer 2 virtual MAC address, which is manually configured, are switched to Layer 2 interfaces.
Configuring a MAC address of an IRB logical interface allows the use of a transparent firewall between two VLANs on the same switch. When both VLANs are on the same subnet and traffic from one VLAN needs to go through the firewall to the host on the other VLAN, then the VLAN tag is changed to communicate with the host on the other VLAN.
Before the introduction of this feature, if the MAC address of an IRB logical interface was the same for both VLANs, the firewall dropped the traffic. This new feature allows you to configure distinct MAC addresses for different VLANs, which facilitates the exchange of traffic between two VLANs on the same switch.
In case of VPLS multihoming, if there is a failover of the primary provider edge (PE) router to a secondary PE router, the MAC address of an IRB changes. The hosts connected to the customer edge (CE) router must change their Address Resolution Protocol (ARP) for IRB’s IP and MAC address. This feature allows you to configure the same MAC address for IRB interfaces in both the primary and secondary PE routers and eliminates the need for changing the ARP binding of the IRB logical interface in CE routers, in case of a failover.
Figure 1 shows the sample topology.

In this example you configure MAC address of IRB logical interfaces.
Configuration
CLI Quick Configuration
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.
Router R0
Router R1
Router R2
Configuring the MAC Address of an IRB Interface
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 CLI User Guide.
Repeat this procedure for Juniper Networks Routers R1 and R2, modifying the appropriate interface names, addresses, and any other parameters for each router.
To configure the MAC address of an IRB interface on Router R0:
Configure the physical interfaces.
[edit interfaces ge-1/3/8]user@R0# set vlan-tagginguser@R0# set encapsulation flexible-ethernet-servicesuser@R0# set unit 10 encapsulation vlan-bridgeuser@R0# set unit 10 vlan-id 10Configure the IRB logical interface.
[edit interfaces irb]user@R0# set unit 10 family inet address 1.1.23.1/24user@R0# set unit 10 family mplsuser@R0# set unit 10 mac 00:00:00:00:00:01[edit interfaces]user@R0# set lo0 unit 10 family inet address 4.4.4.4/32Configure the RSVP protocol.
[edit protocols rsvp]user@R0# set interface irb.10Configure the MPLS protocol.
[edit protocols mpls]user@R0# set label-switched-path R0-1-R2 to 6.6.6.6user@R0# set label-switched-path R0-1-R2 install 6.6.6.6/32 activeuser@R0# set label-switched-path R0-1-R2 no-cspfuser@R0# set interface irb.10user@R0# set interface irb.10Configure the BGP protocol.
[edit protocols BGP]user@R0# set group ibgp type internaluser@R0# set group ibgp local-address 4.4.4.4user@R0# set group ibgp neighbor 6.6.6.6Configure the OSPF protocol.
[edit protocols ospf]user@R0# set area 0.0.0.0 interface irb.10user@R0# set area 0.0.0.0 interface lo0.10 passiveConfigure the LDP protocol.
[edit protocols ldp]user@R0# set interface irb.10user@R0# set interface lo0.10Configure the autonomous system (AS) number.
[edit routing-options]user@R0# set autonomous-system 400Configure the bridge domains.
[edit]user@R0# set bridge-domains lsbd1 vlan-id 10user@R0# set bridge-domains lsbd1 interface ge-1/3/8.10user@R0# set bridge-domains lsbd1 routing-interface irb.10
Results
From configuration mode, enter the show interfaces, show protocols and show bridge-domains, commands and confirm your configuration. 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 devices, commit the configuration.
Verification
Confirm that the configuration is working properly.
Verifying the MAC Address of the IRB Interface
Purpose
Verify that the specified MAC address is assigned to the IRB interface.
Action
From operational mode, run the show interfaces irb command on the device.
user@host# show interfaces irb
Physical interface: irb, Enabled, Physical link is Up Interface index: 132, SNMP ifIndex: 505 Type: Ethernet, Link-level type: Ethernet, MTU: 1514 Device flags : Present Running Interface flags: SNMP-Traps Link type : Full-Duplex Link flags : None Current address: 80:71:1f:c2:58:f0, Hardware address: 80:71:1f:c2:58:f0 Last flapped : Never Input packets : 0 Output packets: 0 Logical interface irb.10 (Index 326) (SNMP ifIndex 634) Flags: SNMP-Traps 0x0 Encapsulation: ENET2 MAC: 00:00:00:00:00:01 Bandwidth: 1000mbps Routing Instance: LS1/default Bridging Domain: lsbd1+10 Input packets : 55202 Output packets: 69286 Protocol inet, MTU: 1450 Flags: Sendbcast-pkt-to-re, Is-Primary, User-MTU Addresses, Flags: Is-Preferred Is-Primary Destination: 1.1.1/24, Local: 1.1.1.1, Broadcast: 1.1.1.255 Addresses, Flags: Is-Preferred Destination: 1.1.23/24, Local: 1.1.23.1, Broadcast: 1.1.23.255 Protocol mpls, MTU: 1500, Maximum labels: 3 Flags: Is-Primary Protocol multiservice, MTU: 1500 Logical interface irb.20 (Index 358) (SNMP ifIndex 635) Flags: SNMP-Traps 0x0 Encapsulation: ENET2 MAC: 00:00:00:00:00:02 Bandwidth: 1000mbps Routing Instance: LS2/default Bridging Domain: lsbd2+10 Input packets : 66044 Output packets: 68464 Protocol inet, MTU: 1450 Flags: Sendbcast-pkt-to-re, Is-Primary, User-MTU Addresses, Flags: Is-Preferred Is-Primary Destination: 1.1.1/24, Local: 1.1.1.2, Broadcast: 1.1.1.255 Addresses, Flags: Is-Preferred Destination: 1.1.23/24, Local: 1.1.23.2, Broadcast: 1.1.23.255 Protocol mpls, MTU: 1500, Maximum labels: 3 Flags: Is-Primary Protocol multiservice, MTU: 1500 Logical interface irb.30 (Index 360) (SNMP ifIndex 636) Flags: SNMP-Traps 0x0 Encapsulation: ENET2 MAC: 00:00:00:00:00:03 Bandwidth: 1000mbps Routing Instance: LS2/default Bridging Domain: lsbd3+40 Input packets : 26948 Output packets: 53605 Protocol inet, MTU: 1500 Flags: Sendbcast-pkt-to-re Addresses, Flags: Is-Preferred Is-Primary Destination: 1.1.22/24, Local: 1.1.22.2, Broadcast: 1.1.22.255 Addresses, Flags: Is-Preferred Destination: 2.2.2/24, Local: 2.2.2.1, Broadcast: 2.2.2.255 Protocol mpls, MTU: 1500, Maximum labels: 3 Protocol multiservice, MTU: 1500 Logical interface irb.40 (Index 355) (SNMP ifIndex 632) Flags: SNMP-Traps 0x0 Encapsulation: ENET2 MAC: 00:00:00:00:00:04 Bandwidth: 1000mbps Routing Instance: LS3/default Bridging Domain: lsbd4+40 Input packets : 40575 Output packets: 31128 Protocol inet, MTU: 1500 Flags: Sendbcast-pkt-to-re, Is-Primary Addresses, Flags: Is-Preferred Is-Primary Destination: 1.1.22/24, Local: 1.1.22.1, Broadcast: 1.1.22.255 Protocol mpls, MTU: 1500, Maximum labels: 3 Flags: Is-Primary Protocol multiservice, MTU: 1500
Meaning
The output shows the manually configured MAC address in the MAC field.
If you did not configure the MAC address for a logical interface, the output does not include this value. However, the device uses the MAC address of the physical interface during data transmission.