Figure 26: SONET/SDH-Based Layer 2 Circuit Topology Diagram

In this second Layer 2 circuit example shown in Figure 26, you configure a Layer 2 circuit for a SONET/SDH interface encapsulated with PPP.
On Router CE1, configure the SONET/SDH interface to handle PPP traffic. Be sure to use the same IP address prefix both here and on the SONET/SDH interface of Router CE2.
Router CE1
- [edit]
- interfaces {
-
- so-0/0/1 {
- description "to PE1 so-0/0/0";
- encapsulation ppp;
-
- unit 0 {
-
- family inet {
- address 10.1.1.1/30;
- }
- }
- }
- }
On Router PE1, configure the PPP-based CE-facing interface with PPP CCC encapsulation. 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/0/0 {
- description "to CE1 so-0/0/1";
- encapsulation ppp-ccc; # Configure CCC encapsulation on CE-facing interfaces.
- unit 0;
- }
-
- 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.
- }
- }
-
- lo0 {
-
- unit 0 {
-
- family inet {
- address 10.255.145.126/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;
- }
-
- l2circuit {
-
- neighbor 10.255.145.130 { #
This points to the loopback of the PE neighbor.
-
- interface so-0/0/0.0 { # Here
you include the local CE-facing interface.
- virtual-circuit-id 1; # 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.
- }
- }
-
- so-0/2/1 {
- description "to PE2 so-1/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.255.145.129/32;
- }
- }
- }
- }
- protocols {
-
- ospf {
- traffic-engineering;
-
- area 0.0.0.0 {
- interface so-0/0/0.0;
- interface so-0/2/1.0;
- }
- }
-
- ldp { # LDP is required as the
signaling protocol for Layer 2 circuits.
- interface so-0/0/0.0;
- interface so-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 PPP-based CE-facing interface with PPP CCC encapsulation. Complete 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 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 PE2
- [edit]
- interfaces {
-
- so-1/0/0 {
- description "to CE1 so-1/0/1";
- encapsulation ppp-ccc; # Configure CCC encapsulation on CE-facing interfaces.
- unit 0;
- }
-
- so-1/1/0 {
- description "to P0 so-0/2/1";
-
- unit 0 {
-
- family inet {
- address 192.168.245.18/30;
- }
- family mpls; # Include the MPLS family on core-facing interfaces.
- }
- }
-
- lo0 {
-
- unit 0 {
-
- family inet {
- address 10.255.145.130/32;
- }
- }
- }
- }
- protocols {
-
- ospf {
- traffic-engineering;
-
- area 0.0.0.0 {
- interface so-1/1/0.0;
- interface lo0.0;
- }
- }
-
- ldp { # LDP is required as the
signaling protocol for Layer 2 circuits.
- interface so-1/1/0.0;
- interface lo0.0;
- }
-
- l2circuit {
-
- neighbor 10.255.145.126 { #
This points to the loopback of the PE neighbor.
-
- interface so-1/0/0.0 { # Here
you include the local CE-facing interface.
- virtual-circuit-id 1; # Be sure
this ID matches the ID of your PE neighbor.
- }
- }
- }
- }
On Router CE2, configure the SONET/SDH interface to handle PPP traffic. Be sure to use the same IP address prefix both here and on the SONET/SDH interface of Router CE1.
Router CE2
- [edit]
- interfaces {
-
- so-1/0/1 {
- description "to PE2 so-1/0/0";
- encapsulation ppp;
-
- unit 0 {
-
- family inet {
- address 10.1.1.2/30;
- }
- }
- }
- }
To verify proper operation of Layer 2 circuits, use the following commands:
The following section shows the output of these commands used with the configuration example:
user@PE1> show l2circuit connectionsLayer-2 Circuit Connections:
Legend for connection status (St)
EI -- encapsulation invalid NP -- interface not present
MM -- mtu mismatch Dn -- down
EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down
CM -- control-word mismatch Up -- operational
OL -- no outgoing label XX -- unknown
NC -- intf encaps not CCC/TCC
Legend for interface status
Up -- operational
Dn -- down
Neighbor: 10.255.145.130
Interface Type St Time last up # Up trans
so-0/0/0.0 (vc 1) rmt Up Jan 26 14:13:54 2003 1
Local interface: so-0/0/0.0, Status: Up, Encapsulation: PPP
Remote PE: 10.255.145.130, Negotiated control-word: Yes (Null)
Incoming label: 100000, Outgoing label: 100000
user@PE1> show ldp database l2circuit
Input label database, 10.255.145.126:0--10.255.145.130:0
Label Prefix
100000 L2CKT CtrlWord PPP VC 1
Output label database, 10.255.145.126:0--10.255.145.130:0
Label Prefix
100000 L2CKT CtrlWord PPP VC 1
user@PE1> show ldp database l2circuit detail
Input label database, 10.255.145.126:0--10.255.145.130:0
Label Prefix
100000 L2CKT CtrlWord PPP VC 1
State: Active
Age: 5:37
Output label database, 10.255.145.126:0--10.255.145.130:0
Label Prefix
100000 L2CKT CtrlWord PPP VC 1
State: Active
Age: 5:37
user@PE1> show route table mpls.0
mpls.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
Restart Complete
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 00:05:04, metric 1
Receive
1 *[MPLS/0] 00:05:04, metric 1
Receive
2 *[MPLS/0] 00:05:04, metric 1
Receive
100000 *[L2VPN/7] 00:04:50
> via so-0/0/0.0, Pop Offset: 4
100016 *[LDP/9] 00:04:52, metric 1
> via so-0/1/0.0, Pop
100016(S=0) *[LDP/9] 00:04:52, metric 1
> via so-0/1/0.0, Pop
so-0/0/0.0 *[L2VPN/7] 00:04:50
> via so-0/1/0.0, Push 100000 Offset: -4