Figure 55: Ethernet-Based Layer 2 Circuit Topology Diagram

In Figure 55, a Layer 2 circuit is established between routers PE1 and PE2 to deliver Layer 2 traffic between customer routers CE1 and CE2. A Layer 2 circuit VC connection is configured on the PE routers only. No special configuration is required on the CE routers, and the provider core P0 router only requires MPLS and LDP on the appropriate interfaces to enable labels to be shared between the PE routers.
On Router CE1, configure the Fast Ethernet interface to handle VLAN traffic. Be sure to use the same VLAN ID both here and on the Fast Ethernet interface of Router CE2.
Router CE1
- [edit]
- interfaces {
-
- fe-1/1/2 {
- description "to PE1 fe-1/1/0";
- vlan-tagging;
-
- unit 600 {
-
vlan-id 600; # Be sure this VLAN ID matches the VLAN ID of your CE neighbor.
-
- family inet {
- address 10.1.1.1/24;
- }
- }
- }
- }
On Router PE1, configure the Ethernet-based CE-facing interface with the CCC encapsulation type of your choice. If you use VLAN CCC, include the vlan-tagging statement at the [edit interfaces ethernet-interface-fpc/pic /port] hierarchy level. Also, include the encapsulation vlan-ccc statement at both the [edit interfaces ethernet-interface-fpc/pic/port] and [edit interfaces ethernet-interface-fpc /pic/port unit unit-number] hierarchy levels.
Establish your Layer 2 circuit with configuration of the l2circuit statement at the [edit protocols] hierarchy level. Remember to include in your Layer 2 circuit configuration the IP address of your remote PE neighbor (usually the loopback address of the neighbor), the interface connected to the CE router, and a virtual circuit identifier for this VC. Then, configure MPLS, LDP, and an IGP (such as OSPF) to enable signaling for your Layer 2 circuit.
Router PE1
- [edit]
- interfaces {
-
- so-0/1/0 {
- description "to P0 so-0/0/0";
-
- unit 0 {
-
- family inet {
- address 192.168.245.22/30;
- }
- family mpls; # Include the MPLS family on core-facing interfaces.
- }
- }
-
- fe-1/1/0 {
- description "to CE1 fe-1/1/2";
- vlan-tagging;
-
encapsulation vlan-ccc; # Configure CCC encapsulation on CE-facing interfaces.
-
- unit 600 {
-
encapsulation vlan-ccc; # Enable this encapsulation on the logical interface.
- vlan-id 600;
- }
- }
-
- lo0 {
-
- unit 0 {
-
- family inet {
- address 10.245.14.173/32;
- }
- }
- }
- }
- protocols {
-
- ospf {
- traffic-engineering;
-
- area 0.0.0.0 {
- interface so-0/1/0.0;
- interface lo0.0;
- }
- }
-
-
ldp { # LDP is required as the
signaling protocol for Layer 2 circuits.
- interface so-0/1/0.0;
-
interface lo0.0;# You must include
the loopback address in LDP.
- }
-
-
l2circuit {
-
-
neighbor 10.245.14.179 { # This
points to the loopback of the PE neighbor.
-
-
interface fe-1/1/0.600 { # Here
you include the local CE-facing interface.
-
virtual-circuit-id 5; # Be sure
this ID matches the ID of your PE neighbor.
- }
- }
- }
- }
On Router P0, configure LDP, MPLS, and OSPF on the interfaces connected to the PE routers. The core router provides the MPLS backbone needed to tunnel Layer 2 traffic from the ingress PR router to the egress PE router.
Router P0
- [edit]
- interfaces {
-
- so-0/0/0 {
- description "to PE1 so-0/1/0";
-
- unit 0 {
-
- family inet {
- address 192.168.245.21/30;
- }
- family mpls; # Include the MPLS family on core interfaces.
- }
- }
-
- t3-0/2/1 {
- description "to PE2 t3-0/1/0";
-
- unit 0 {
-
- family inet {
- address 192.168.245.17/30;
- }
- family mpls; # Include the MPLS family on core interfaces.
- }
- }
-
- lo0 {
-
- unit 0 {
-
- family inet {
- address 10.245.14.171/32;
- }
- }
- }
- }
- protocols {
-
- ospf {
- traffic-engineering;
-
- area 0.0.0.0 {
- interface so-0/0/0.0;
- interface t3-0/2/1.0;
- }
- }
-
-
ldp { # LDP is required as the
signaling protocol for Layer 2 circuits.
- interface so-0/0/0.0;
- interface t3-0/2/1.0;
- }
- }
On Router PE2, complete the Layer 2 circuit by configuring statements to match those previously set on Router PE1. Configure the Ethernet-based CE-facing interface with CCC encapsulation. Again, you must include the vlan-tagging statement at the [edit interfaces ethernet-interface-fpc/pic/port] hierarchy level when you use VLAN CCC. Also, include the encapsulation vlan-ccc statement at both the [edit interfaces ethernet-interface-fpc/pic/port] and [edit interfaces ethernet-interface-fpc/pic/port unit unit-number] hierarchy levels.
Establish your Layer 2 circuit with configuration of the l2circuit statement at the [edit protocols] hierarchy level. Remember to include in your Layer 2 circuit configuration the IP address of your remote PE neighbor (Router PE1), the virtual circuit identifier previously configured on Router PE1, and the interface connected to the CE router. Finally, configure MPLS, LDP, and OSPF to enable signaling for your Layer 2 circuit.
Router PE2
- [edit]
- interfaces {
-
- t3-0/1/0 {
- description "P0 t3-0/2/1";
-
- unit 0 {
-
- family inet {
- address 192.168.245.18/30;
- }
- family mpls; # Include the MPLS family on core-facing interfaces.
- }
- }
-
- fe-0/2/0 {
- description "to CE2 fe-0/2/0";
- vlan-tagging;
-
encapsulation vlan-ccc; # Configure CCC encapsulation on CE-facing interfaces.
-
- unit 600 {
-
encapsulation vlan-ccc; # Enable this encapsulation on the logical interface.
- vlan-id 600;
- }
- }
-
- lo0 {
-
- unit 0 {
-
- family inet {
- address 10.245.14.179/32;
- }
- }
- }
- }
- protocols {
-
- ospf {
- traffic-engineering;
-
- area 0.0.0.0 {
- interface t3-0/1/0.0;
- interface lo0.0;
- }
- }
-
- ldp { # LDP is required as the signaling protocol for Layer
2 circuits.
- interface t3-0/1/0.0;
- interface lo0.0; # You must include the loopback address
in LDP.
- }
-
- l2circuit {
-
- neighbor 10.245.14.173 { # This points to the loopback
of the PE neighbor.
-
- interface fe-0/2/0.600 { # Here you include the local CE-facing
interface.
- virtual-circuit-id 5; # Be sure this ID matches the ID
of your PE neighbor.
- }
- }
- }
- }
On Router CE2, configure the Fast Ethernet interface to handle VLAN traffic. Be sure to use the same VLAN ID on this interface as the one seen on the Fast Ethernet interface of Router CE1.
Router CE2
- [edit]
- interfaces {
-
- fe-0/2/0 {
- description "to PE2 fe-0/2/0";
- vlan-tagging;
-
- unit 600 {
- vlan-id 600; # Be sure this VLAN ID matches the VLAN ID
of your CE neighbor.
-
- family inet {
- address 10.1.1.2/24;
- }
- }
- }
- }