This lab is on the Junos vEvo platform and OSPF is used rather than IS-IS. My preference is always to use IS-IS but you can use OSPF for segment routing.

PE1
set interfaces et-0/0/0 vlan-tagging
set interfaces et-0/0/0 encapsulation flexible-ethernet-services
set interfaces et-0/0/0 unit 512 encapsulation vlan-ccc
set interfaces et-0/0/0 unit 512 vlan-id 512
set interfaces et-0/0/2 unit 0 family inet address 1.1.1.1/30
set interfaces et-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 5.5.5.5/32
set interfaces lo0 unit 0 family mpls
set routing-instances cust1 instance-type l2vpn
set routing-instances cust1 protocols l2vpn site cust1 interface et-0/0/0.512
set routing-instances cust1 protocols l2vpn site cust1 site-identifier 1
set routing-instances cust1 protocols l2vpn encapsulation-type ethernet-vlan
set routing-instances cust1 interface et-0/0/0.512
set routing-instances cust1 route-distinguisher 5.5.5.5:1
set routing-instances cust1 vrf-target target:65530:1
set routing-options router-id 5.5.5.5
set routing-options autonomous-system 65530
set protocols bgp path-selection l2vpn-use-bgp-rules
set protocols bgp group int type internal
set protocols bgp group int local-address 5.5.5.5
set protocols bgp group int family inet unicast
set protocols bgp group int family l2vpn signaling
set protocols bgp group int neighbor 8.8.8.8
set protocols mpls interface all
set protocols ospf source-packet-routing node-segment ipv4-index 600
set protocols ospf source-packet-routing srgb start-label 70000
set protocols ospf source-packet-routing srgb index-range 1000
set protocols ospf area 0.0.0.0 interface et-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
P1
set interfaces et-0/0/0 unit 0 family inet address 1.1.1.2/30
set interfaces et-0/0/0 unit 0 family mpls
set interfaces et-0/0/1 unit 0 family inet address 2.2.2.1/30
set interfaces et-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 6.6.6.6/32
set interfaces lo0 unit 0 family mpls
set protocols mpls interface all
set protocols ospf source-packet-routing node-segment ipv4-index 601
set protocols ospf source-packet-routing srgb start-label 70000
set protocols ospf source-packet-routing srgb index-range 1000
set protocols ospf area 0.0.0.0 interface et-0/0/0.0
set protocols ospf area 0.0.0.0 interface et-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
P2
set interfaces et-0/0/0 unit 0 family inet address 2.2.2.2/30
set interfaces et-0/0/0 unit 0 family mpls
set interfaces et-0/0/1 unit 0 family inet address 3.3.3.1/30
set interfaces et-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 33.33.33.33/32
set interfaces lo0 unit 0 family mpls
set protocols mpls interface all
set protocols ospf source-packet-routing node-segment ipv4-index 602
set protocols ospf source-packet-routing srgb start-label 70000
set protocols ospf source-packet-routing srgb index-range 1000
set protocols ospf area 0.0.0.0 interface et-0/0/0.0
set protocols ospf area 0.0.0.0 interface et-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
P3
set interfaces et-0/0/0 unit 0 family inet address 3.3.3.2/30
set interfaces et-0/0/0 unit 0 family mpls
set interfaces et-0/0/1 unit 0 family inet address 4.4.4.1/30
set interfaces et-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 7.7.7.7/32
set interfaces lo0 unit 0 family mpls
set protocols mpls interface all
set protocols ospf source-packet-routing node-segment ipv4-index 603
set protocols ospf source-packet-routing srgb start-label 70000
set protocols ospf source-packet-routing srgb index-range 1000
set protocols ospf area 0.0.0.0 interface et-0/0/0.0
set protocols ospf area 0.0.0.0 interface et-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
PE2
set interfaces et-0/0/0 vlan-tagging
set interfaces et-0/0/0 encapsulation flexible-ethernet-services
set interfaces et-0/0/0 unit 512 encapsulation vlan-ccc
set interfaces et-0/0/0 unit 512 vlan-id 512
set interfaces et-0/0/2 unit 0 family inet address 4.4.4.2/30
set interfaces et-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 8.8.8.8/32
set interfaces lo0 unit 0 family mpls
set routing-instances cust1 instance-type l2vpn
set routing-instances cust1 protocols l2vpn site cust1 interface et-0/0/0.512
set routing-instances cust1 protocols l2vpn site cust1 site-identifier 2
set routing-instances cust1 protocols l2vpn encapsulation-type ethernet-vlan
set routing-instances cust1 interface et-0/0/0.512
set routing-instances cust1 route-distinguisher 8.8.8.8:1
set routing-instances cust1 vrf-target target:65530:1
set routing-options router-id 8.8.8.8
set routing-options autonomous-system 65530
set protocols bgp path-selection l2vpn-use-bgp-rules
set protocols bgp group int type internal
set protocols bgp group int local-address 8.8.8.8
set protocols bgp group int family inet unicast
set protocols bgp group int family l2vpn signaling
set protocols bgp group int neighbor 5.5.5.5
set protocols mpls interface all
set protocols ospf source-packet-routing node-segment ipv4-index 604
set protocols ospf source-packet-routing srgb start-label 70000
set protocols ospf source-packet-routing srgb index-range 1000
set protocols ospf area 0.0.0.0 interface et-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
The VPN will now be up and have confirmed by configuring OSPF on the CE devices.
