Description

This article provides an example Layer 2 traffic over GRE tunnel on MX. The bridge domain family for GRE interface was introduced in 15.1 MX Series.

Solution

In order to enable L2 Ethernet traffic to be encapsulated on GRE tunnels, you need to configure bridge-domain protocol family on the GRE interfaces and associate the gr- interfaces with the bridge domain. The GRE interfaces need to be configured as core-facing interfaces, and they must be access or trunk interfaces. To configure the bridge domain family on gr- interfaces, include the family bridge statement at the [edit interfaces gr-fpc/pic/port unit logical-unit-number] hierarchy level.

For more information, refer to the Juniper technical documentation on family bridge (GRE Interfaces) .

The following is a simple configuration of L2 over GRE on MX using the topology below:


alt

Configuration of MX1

chassis {
    fpc 0 {
        pic 0 {
            tunnel-services {
                bandwidth 10g;
            }
        }
    }
}
interfaces {
    xe-0/0/0 {
        description core-facing;
        unit 0 {
            family inet {
                address 10.0.0.1/24;
            }
        }
    }
    gr-0/0/0 {
        unit 0 {
            tunnel {
                source 10.0.0.1;
                destination 10.0.0.2;
                key 1;
            }
            family bridge {
                core-facing;
                interface-mode trunk;
                vlan-id-list 1-4094;
            }
        }
    }
    xe-2/1/0 {
        description client-facing;
        flexible-vlan-tagging;
        encapsulation flexible-ethernet-services;
        unit 0 {
            family bridge {
                interface-mode trunk;
                vlan-id-list 100-200;
            }
        }
    }
}
routing-instances {
    vs1 {
        instance-type virtual-switch;
        interface gr-0/0/0.0;
        interface xe-2/1/0.0;
        bridge-domains {
            bd100 {
                vlan-id 100;
            }
            bd200 {
                vlan-id 200;
            }
        }
    }                                   
}
Configuration of MX2

chassis {
    fpc 0 {
        pic 0 {
            tunnel-services {
                bandwidth 10g;
            }
        }
    }
}
interfaces {
    xe-0/0/0 {
        description core-facing;
        unit 0 {
            family inet {
                address 10.0.0.2/24;
            }
        }
    }
    gr-0/0/0 {
        unit 0 {
            tunnel {
                source 10.0.0.2;
                destination 10.0.0.1;
                key 1;
            }
            family bridge {
                core-facing;
                interface-mode trunk;
                vlan-id-list 1-4094;
            }
        }
    }
    xe-2/1/0 {
        description client-facing;
        flexible-vlan-tagging;
        encapsulation flexible-ethernet-services;
        unit 0 {
            family bridge {
                interface-mode trunk;
                vlan-id-list 100-200;
            }
        }
    }
}
routing-instances {
    vs1 {
        instance-type virtual-switch;
        interface gr-0/0/0.0;
        interface xe-2/1/0.0;
        bridge-domains {
            bd100 {
                vlan-id 100;
            }
            bd200 {
                vlan-id 200;
            }
        }
    }                                   
}