ESR1(config)# hostname ESR1
ESR1(config)# 
ESR1(config)# ip vrf l3vpn_service
ESR1(config-vrf)#   ip protocols bgp max-routes 100
ESR1(config-vrf)#   rd 65500:1
ESR1(config-vrf)#   route-target export 65500:1
ESR1(config-vrf)#   route-target import 65500:1
ESR1(config-vrf)# exit
ESR1(config)# 
ESR1(config)# 
ESR1(config)# system cpu load-balance mpls passenger ip
ESR1(config)# security zone untrusted
ESR1(config-zone)# exit
ESR1(config)# security zone trusted
ESR1(config-zone)# exit
ESR1(config)# 
ESR1(config)# route-map BGP_OUT
ESR1(config-route-map)#   rule 1
ESR1(config-route-map-rule)#   exit
ESR1(config-route-map)# exit
ESR1(config)# router bgp 65500
ESR1(config-bgp)#   router-id 10.12.0.1
ESR1(config-bgp)#   neighbor 10.12.0.2
ESR1(config-bgp-neighbor)#     remote-as 65500
ESR1(config-bgp-neighbor)#     update-source 10.12.0.1
ESR1(config-bgp-neighbor)#     address-family vpnv4 unicast
ESR1(config-bgp-neighbor-af)#       send-community extended
ESR1(config-bgp-neighbor-af)#       enable
ESR1(config-bgp-neighbor-af)#     exit
ESR1(config-bgp-neighbor)#     enable
ESR1(config-bgp-neighbor)#   exit
ESR1(config-bgp)#   enable
ESR1(config-bgp)#   vrf l3vpn_service
ESR1(config-bgp-vrf)#     neighbor 10.10.0.1
ESR1(config-bgp-vrf-neighbor)#       remote-as 65501
ESR1(config-bgp-vrf-neighbor)#       address-family ipv4 unicast
ESR1(config-bgp-neighbor-af-vrf)#         route-map BGP_OUT out
ESR1(config-bgp-neighbor-af-vrf)#         enable
ESR1(config-bgp-neighbor-af-vrf)#       exit
ESR1(config-bgp-vrf-neighbor)#       enable
ESR1(config-bgp-vrf-neighbor)#     exit
ESR1(config-bgp-vrf)#     address-family ipv4 unicast
ESR1(config-bgp-vrf-af)#       redistribute bgp 65500 route-map BGP_OUT
ESR1(config-bgp-vrf-af)#     exit
ESR1(config-bgp-vrf)#     enable
ESR1(config-bgp-vrf)#   exit
ESR1(config-bgp)# exit
ESR1(config)# 
ESR1(config)# router ospf 1
ESR1(config-ospf)#   router-id 10.12.0.1
ESR1(config-ospf)#   area 0.0.0.0
ESR1(config-ospf-area)#     enable
ESR1(config-ospf-area)#   exit
ESR1(config-ospf)#   enable
ESR1(config-ospf)# exit
ESR1(config)#