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