In the simple IRB configuration example shown in Figure 90, the router is a CE router that is connected to multiple hosts and the provider network. IRB enables the router to switch Layer 2 traffic between hosts and route Layer 3 traffic (through the IRB interface) to the provider network.
Figure 90: IRB Example

The first step in configuring the router is configuring Layer 3 information on logical units within the IRB interface:
- [edit]
- interfaces {
-
- ge-3/1/0 {
- encapsulation flexible-ethernet-services;
- flexible-vlan-tagging;
-
- unit 0 {
- encapsulation vlan-bridge;
- vlan-id 100;
- }
-
- unit 1 {
- encapsulation vlan-bridge;
- vlan-id 200;
- }
- }
-
- ge-3/1/1 {
- encapsulation flexible-ethernet-services;
- flexible-vlan-tagging;
-
- unit 0 {
- encapsulation vlan-bridge;
- vlan-id 100;
- }
-
- unit 1 {
- encapsulation vlan-bridge;
- vlan-id 200;
- }
- }
-
- ge-3/3/0 {
- encapsulation flexible-ethernet-services;
- flexible-vlan-tagging;
-
- unit 0 {
- encapsulation vlan-bridge;
- vlan-id 100;
- }
-
- unit 1 {
- encapsulation vlan-bridge;
- vlan-id 200;
- }
- }
-
- irb {
-
- unit 0 {
-
- family inet {
- address 172.17.1.2/24;
- }
- }
-
- unit 1 {
-
- family inet {
- address 12.12.1.2/28;
- }
- }
- }
- }
In such a router configuration, you must configure a bridge domain with the interfaces through which the host traffic can travel. In this configuration, the bridge domains are configured on a virtual switch and the interfaces are divided into logical units within each bridge domain. The following example shows the bridge domain customer0_bd0 that is within the virtual switch routing instance customer. Note that there are MAC limits in place for the the logical interfaces configured on this bridge domain:
- [edit]
- routing-instances {
-
- customer {
- instance-type virtual switch;
-
- bridge-domains {
-
- customer0_bd0 {
- domain-type bridge;
- vlan-id 100;
- interface ge-3/1/0.0;
- interface ge-3/1/1.0;
- interface ge-3/3/0.0;
- routing-interface irb.0;
-
- bridge-options {
-
- mac-table-size {
- 1048575;
- }
-
- interface ge-3/1/0.0 {
-
- interface-mac-limit {
- 131071;
- }
- }
-
- interface ge-3/1/1.0 {
-
- interface-mac-limit {
- 131071;
- }
- }
-
- interface ge-3/3/0.0 {
-
- interface-mac-limit {
- 131071;
- }
- }
- }
- }
- }
- }
- }
The bridge domain customer1_bd1, which is also configured under the customer virtual switch routing instance, is configured for a VLAN ID of 200 and routing-interface irb.1. There are no MAC limits set for this bridge domain:
- [edit]
- routing-instances {
-
- customer {
-
- instance-type virtual-switch;
- bridge-domains {
-
- customer1_bd1 {
- domain-type bridge;
- vlan-id 200;
- interface ge-3/1/0.1;
- interface ge-3/1/1.1;
- interface ge-3/3/0.1;
- routing-interface irb.1;
- }
- }
- }
- }