The objective of this experiment is connecting two separates network using L2CCC over MPLS on VPN services (CoC).

CE1 and CE2 want to connect each other. MPLS operator provides them COC termination on PE1 and PE2. MPLS provider needs to enable MPLS session towards CE.
After MPLS session are created on each routers, PEA and PEB creates L2Circuits connection each others.
Step 1: Configure MP-BGP on PE1 and PE2 to carry l3VPN unicast.
enugadi@JNCIE-M# show logical-routers PE1 protocols bgp
group ibgp {
type internal;
local-address 100.0.0.1;
family inet-vpn {
unicast;
}
neighbor 100.0.0.3;
}
[edit]
enugadi@JNCIE-M# show logical-routers PE2 protocols bgp
group ibgp {
type internal;
local-address 100.0.0.3;
family inet-vpn {
unicast;
}
neighbor 100.0.0.1;
}
Step 2: Configure L3VPN and policies on PE1 and PE2.
Note: Since the PE-CE used is OSPF, you need to export policy to redistribute BGP prefix to OSPF. Egress policy will need to ensure that Lo0 of PE will send to CE.
L3VPN Configuration on PE1
enugadi@JNCIE-M# show logical-routers PE1 routing-instances
NPE-VRF {
instance-type vrf;
interface fe-1/3/0.15;
interface lo0.888;
route-distinguisher 1:2;
vrf-import csc-import;
vrf-export csc-export;
vrf-table-label;
protocols {
ospf {
export bgp-to-ospf;
area 0.0.0.11 {
interface fe-1/3/0.15;
interface lo0.888;
}
}
ldp {
egress-policy bgp-to-ospf;
interface fe-1/3/0.15;
interface lo0.888;
}
}
}
[edit]
enugadi@JNCIE-M# show logical-routers PE1 policy-options policy-statement csc-import
term 1 {
from {
protocol bgp;
community csc-comm;
}
then accept;
}
term 2 {
then reject;
}
[edit]
enugadi@JNCIE-M# show logical-routers PE1 policy-options policy-statement csc-export
term 1 {
from protocol ldp;
then {
community add csc-comm;
accept;
}
}
term 2 {
then reject;
}
L3VPN Configuration on PE2:
enugadi@JNCIE-M# show logical-routers PE2 routing-instances
NPE-VRF-B {
instance-type vrf;
interface fe-1/3/0.34;
interface lo0.999;
route-distinguisher 1:1;
vrf-import csc-import;
vrf-export csc-export;
vrf-table-label;
protocols {
ospf {
export bgp-to-ospf;
area 0.0.0.10 {
interface fe-1/3/0.34;
interface lo0.999;
}
}
ldp {
egress-policy bgp-to-ospf;
interface fe-1/3/0.34;
interface lo0.999;
}
}
}
[edit]
enugadi@JNCIE-M# show logical-routers PE2 policy-options policy-statement csc-import
term 1 {
from {
protocol bgp;
community csc-comm;
}
then accept;
}
term 2 {
then reject;
}
[edit]
enugadi@JNCIE-M# show logical-routers PE2 policy-options policy-statement csc-export
term 1 {
from protocol ldp;
then {
community add csc-comm;
accept;
}
}
term 2 {
then reject;
}
Step 3: Verify BGP connection from PE1 to PE2 vice versa. Verify PE-CE OSPF neighbor state.
Verification on PE1:
enugadi@JNCIE-M# run show bgp summary logical-router PE1
Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l3vpn.0 1 1 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Damped...
100.0.0.3 64000 54 60 0 0 21:46 Establ
bgp.l3vpn.0: 1/1/0
NPE-VRF.inet.0: 1/1/0
[edit]
enugadi@JNCIE-M# run show ospf neighbor logical-router PE1 instance NPE-VRF
Address Interface State ID Pri Dead
15.15.0.2 fe-1/3/0.15 Full 100.0.0.1 128 34
Verification on PE2
enugadi@JNCIE-M# run show bgp summary logical-router PE2
Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l3vpn.0 2 2 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Damped...
100.0.0.1 64000 60 57 0 0 22:12 Establ
bgp.l3vpn.0: 2/2/0
NPE-VRF-B.inet.0: 2/2/0
[edit]
enugadi@JNCIE-M# run show ospf neighbor logical-router PE2 instance NPE-VRF-B
Address Interface State ID Pri Dead
13.13.0.2 fe-1/3/0.34 Full 100.0.0.4 128 32
Well, all protocols are working as expected.
Step 4: Verify LDP session on PE-CE connection.
enugadi@JNCIE-M# run show ldp neighbor logical-router PE1 instance NPE-VRF
Address Interface Label space ID Hold time
15.15.0.2 fe-1/3/0.15 100.0.0.1:0 11
[edit]
enugadi@JNCIE-M# run show ldp neighbor logical-router PE2 instance NPE-VRF-B
Address Interface Label space ID Hold time
13.13.0.2 fe-1/3/0.34 100.0.0.4:0 11
Step 5: Verify PEA receives FEC of PEB (10.0.100.4).
enugadi@JNCIE-M# run show route logical-router PEA table inet.3
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
100.0.0.1/32 *[LDP/9] 00:17:29, metric 1
> to 15.16.0.1 via fe-1/3/0.16
100.0.0.4/32 *[LDP/9] 00:17:28, metric 1
> to 15.16.0.1 via fe-1/3/0.16, Push 100048
Step 6: Configure L2Circuit from PEA to PEB vice versa.
enugadi@JNCIE-M# show logical-routers PEA protocols l2circuit
neighbor 100.0.0.4 {
interface ge-0/0/3.0 {
virtual-circuit-id 15;
}
}
[edit]
enugadi@JNCIE-M# show logical-routers PEA interfaces ge-0/0/3
unit 0;
enugadi@JNCIE-M# show logical-routers PEB protocols l2circuit
neighbor 100.0.0.5 {
interface ge-0/0/0.0 {
virtual-circuit-id 15;
}
}
enugadi@JNCIE-M# show logical-routers PEB interfaces ge-0/0/0
unit 0;
Step 7: Verify L2Circuits connection
enugadi@JNCIE-M# run show l2circuit connections logical-router PEA
Layer-2 Circuit Connections:
Legend for connection status (St)
EI -- encapsulation invalid NP -- interface h/w not present
MM -- mtu mismatch Dn -- down
EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down
CM -- control-word mismatch Up -- operational
VM -- vlan id mismatch CF -- Call admission control failure
OL -- no outgoing label XX -- unknown
NC -- intf encaps not CCC/TCC
CB -- rcvd cell-bundle size bad
Legend for interface status
Up -- operational
Dn -- down
Neighbor: 100.0.0.4
Interface Type St Time last up # Up trans
ge-0/0/3.0(vc 15) rmt Up Oct 29 04:15:46 2008 2
Local interface: ge-0/0/3.0, Status: Up, Encapsulation: ETHERNET
Remote PE: 100.0.0.4, Negotiated control-word: Yes (Null)
Incoming label: 100000, Outgoing label: 100000
[edit]
enugadi@JNCIE-M# run show l2circuit connections logical-router PEB
Layer-2 Circuit Connections:
Legend for connection status (St)
EI -- encapsulation invalid NP -- interface h/w not present
MM -- mtu mismatch Dn -- down
EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down
CM -- control-word mismatch Up -- operational
VM -- vlan id mismatch CF -- Call admission control failure
OL -- no outgoing label XX -- unknown
NC -- intf encaps not CCC/TCC
CB -- rcvd cell-bundle size bad
Legend for interface status
Up -- operational
Dn -- down
Neighbor: 100.0.0.5
Interface Type St Time last up # Up trans
ge-0/0/0.0(vc 15) rmt Up Oct 29 04:15:48 2008 1
Local interface: ge-0/0/0.0, Status: Up, Encapsulation: ETHERNET
Remote PE: 100.0.0.5, Negotiated control-word: Yes (Null)
Incoming label: 100000, Outgoing label: 100000
Since the L2Circuit between PEA and PEB is in upstate, CE1 should be able to create connection to CE2.
enugadi@JNCIE-M# run ping 172.16.0.2 logical-router CE1 rapid count 100
PING 172.16.0.2 (172.16.0.2): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
--- 172.16.0.2 ping statistics ---
100 packets transmitted, 100 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.066/1.129/3.223/0.278 ms
Check OSPF neighbor state on CE1 and CE2
enugadi@JNCIE-M# run show ospf neighbor logical-router CE1
Address Interface State ID Pri Dead
172.16.0.2 ge-0/0/2.0 Full 22.22.22.22 128 39
[edit]
enugadi@JNCIE-M# run show ospf neighbor logical-router CE2
Address Interface State ID Pri Dead
172.16.0.1 ge-0/0/1.0 Full 11.11.11.11 128 32
Well, it’s working as expected.
You can download complete configuration here coc-l2circuits.