! PermitANY — Juniper JunOS MPLS L3VPN ! MPLS L3VPN configuration for Juniper MX routers: LDP or RSVP label distribution, VRF instances with PE-CE routing (BGP/OSPF/static), and VPNv4 route reflectors. ! Generated: 2026-09-20 ! These are EXAMPLE values. Replace with your actual config before deploying. ! set system host-name JNP-PE-01 set routing-options router-id 10.0.0.1 set routing-options autonomous-system 65001 ! # Core Interfaces set interfaces ge-0/0/0.0 family inet address 10.1.1.1/30 set interfaces ge-0/0/0.0 family mpls ! # MPLS & Label Protocol set protocols mpls interface all {{#if (eq label_proto "ldp")}} set protocols ldp interface all {{/if}} {{#if (eq label_proto "rsvp")}} set protocols rsvp interface all {{/if}} ! # BGP VPNv4 (PE to RR) set protocols bgp group VPNv4-RR type internal set protocols bgp group VPNv4-RR family inet-vpn unicast set protocols bgp group VPNv4-RR neighbor 10.0.0.100 local-address 10.0.0.1 ! # VRF Instances set routing-instances CUSTOMER-A instance-type vrf set routing-instances CUSTOMER-A interface ge-0/0/1.0 set routing-instances CUSTOMER-A route-distinguisher 65001:100 set routing-instances CUSTOMER-A vrf-import VRF-IMPORT-CUSTOMER-A set routing-instances CUSTOMER-A vrf-export VRF-EXPORT-CUSTOMER-A set routing-instances CUSTOMER-A vrf-table-label set interfaces ge-0/0/1.0 family inet address 192.168.1.1/30 {{#if (eq ce_routing "static")}} set routing-instances CUSTOMER-A routing-options static route 0.0.0.0/0 next-hop 192.168.1.2 {{/if}} {{#if (eq ce_routing "ospf")}} set routing-instances CUSTOMER-A protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set routing-instances CUSTOMER-A protocols ospf export VRF-BGP-TO-OSPF {{/if}} {{#if (eq ce_routing "bgp")}} set routing-instances CUSTOMER-A protocols bgp group CE-BGP type external set routing-instances CUSTOMER-A protocols bgp group CE-BGP neighbor 192.168.1.2 peer-as 65100 {{/if}} ! # RT Community Policies for CUSTOMER-A set policy-options community RT-CUSTOMER-A-IMPORT members target:65001:100 set policy-options community RT-CUSTOMER-A-EXPORT members target:65001:100 set policy-options policy-statement VRF-IMPORT-CUSTOMER-A term MATCH from community RT-CUSTOMER-A-IMPORT set policy-options policy-statement VRF-IMPORT-CUSTOMER-A term MATCH then accept set policy-options policy-statement VRF-IMPORT-CUSTOMER-A term DEFAULT then reject set policy-options policy-statement VRF-EXPORT-CUSTOMER-A term ALL from protocol [bgp direct static ospf] set policy-options policy-statement VRF-EXPORT-CUSTOMER-A term ALL then community add RT-CUSTOMER-A-EXPORT set policy-options policy-statement VRF-EXPORT-CUSTOMER-A term ALL then accept