
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)#ip address 10.143.73.1/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#prefix-sid index 1  | Configure prefix sid index value  | 
(config-if)#exit  | Exit interface mode  | 
#configure terminal   | Enter configuration mode.  | 
(config)#evpn mpls enable  | Enable EVPN MPLS. Note: Reload is required after Enabling/ Disabling EVPN MPLS Feature.  | 
(config)#evpn mpls vtep-ip-global 10.143.73.1  | Configuring loopback IP as VTEP global IP   | 
(config)#commit  | Commit the candidate configuration to the running configuration  | 
(config)#end  | Ending config mode  | 
#write memory  | Save config to startup config  | 
#reload  | Reload device after enabling evpn  | 
(config)#router ldp  | Enter the Router LDP mode.  | 
(config-router)#router-id 10.143.73.1  | Set the router ID to IP address 10.143.73.1.  | 
(config-router)#transport-address ipv4 10.143.73.1  |  Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface.  | 
(config-router)# targeted-peer ipv4 10.143.73.3  | Configure targeted peer  | 
(config-router-targeted-peer)# exit-targeted-peer-mode  | Exit from router target peer and LDP mode   | 
(config)#interface xe16  | Enter the Interface mode for xe16  | 
(config-if)# ip address 10.255.128.2/31  | Configure IP address on the interface.  | 
(config-if)#mtu 9900  | Configure mtu at interface level  | 
(config-if)# label-switching  | Enable label switching on the interface.  | 
(config-if)# enable-ldp ipv4  | Enable ldp on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe4  | Enter the Interface mode for xe4.  | 
(config-if)# ip address 10.255.128.10/31  | Configure IP address on the interface.  | 
(config-if)#mtu 9900  | Configure mtu at interface level  | 
(config-if)# label-switching  | Enable label switching on the interface.  | 
(config-if)# enable-ldp ipv4  | Enable ldp on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 100  | Enter the Router OSPF mode.  | 
(config-router)#ospf router-id 10.143.73.1  | Router-id configurations   | 
(config-router)# bfd all-interfaces  | Enable the OSPF enabled interfaces with bfd  | 
(config-router)# network 10.143.73.1/32 area 0.0.0.0  | Advertise loopback address in OSPF.  | 
(config-router)# network 10.255.128.2/31 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# network 10.255.128.10/31 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# ospf segment-routing global block 16000 17000   | Enable SRGB under ospf process 100  | 
(config-router)#segment-routing mpls   | Enable segment routing  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)# router bgp 100   | Enter the Router BGP mode, ASN: 100.  | 
(config-router)# neighbor 10.143.73.3 remote-as 100  | Configuring PE3 as iBGP neighbor using it's loopback ip.  | 
(config-router)# neighbor 10.143.73.3 fall-over bfd multihop  | Configure neighbor bfd multihop   | 
(config-router)# neighbor 10.143.73.3 update-source lo  | Source of routing updates as loopback  | 
(config-router)# neighbor 10.143.73.3 advertisement-interval 0  | Configure advertisement interval  | 
(config-router)# address-family vpnv4 unicast  | Enter VPNv4 Address family mode  | 
(config-router-af)# neighbor 10.143.73.3 activate  | Enabling VPNv4 Address family for neighbor..  | 
(config-router-af)# exit-address-family   | Exit Address-family mode.  | 
(config-router)# address-family l2vpn vpls  | Enter l2vpn Address family mode  | 
(config-router-af)# neighbor 10.143.73.3 activate  | Enabling l2vpn Address family for neighbor..  | 
(config-router-af)# exit-address-family   | Exit Address-family mode.  | 
(config-router)# address-family l2vpn evpn  | Enter evpn Address family mode  | 
(config-router-af)# neighbor 10.143.73.3 activate  | Enabling evpn  Address family for neighbor..  | 
(config-router-af)# exit-address-family   | Exit Address-family mode.  | 
(config-router)# address-family vpnv6 unicast  | Enter VPNv6 Address family mode  | 
(config-router-af)# neighbor 10.143.73.3 activate  | Enabling VPNv6 Address family for neighbor..  | 
(config-router-af)# exit-address-family   | Exit Address-family mode.  | 
(config)#segment-routing   | Enter the segment routing mode.  | 
(config-sr)# mpls sr-prefer  | prefer segment routing MPLS entries for forwarding.  | 
((config-sr)#traffic-engineering  | Enter traffic engineering mode.  | 
(config-sr-te)# policy PE1-P1-PE3  | Configure SR policy  | 
(config-sr-pol)# color 1 end-point 10.143.73.3  | Configure color with destination address.  | 
(config-sr-pol)#candidate-path 1  | Enter candidate path mode.  | 
(config-sr-pol-cp)#dynamic-path ospf 100   | Configure dynamic path ospf  | 
(config-sr-pol-cp)#constraints   | Enter constraint mode  | 
(config-sr-dyn-cp-cons)# 10.143.73.5 loose  | Configure P1 as next-hop loose mode.  | 
(config-sr-dyn-cp-cons)#exit-pol-cp   | Exit candidate path mode.  | 
(config-sr-pol-cp)#exit-sr-pol   | Exit SR policy mode.  | 
(config-sr-te)# policy PE1-P2-PE3  | Configure SR policy  | 
(config-sr-pol)# color 2 end-point 10.143.73.3  | Configure color with destination address.  | 
(config-sr-pol)#candidate-path 1  | Enter candidate path mode.  | 
(config-sr-pol-cp)#dynamic-path ospf 100   | Configure dynamic path ospf  | 
(config-sr-pol-cp)#constraints   | Enter constraint mode  | 
(config-sr-dyn-cp-cons)# 10.143.73.6 loose  | Configure P2 as next-hop loose mode.  | 
(config-sr-dyn-cp-cons)#exit-pol-cp   | Exit candidate path mode.  | 
(config-sr-pol-cp)#exit-sr-pol   | Exit SR policy mode.  | 
(config)# tunnel-policy PE1-P1-PE3  | Configure tunnel policy  | 
(config-tnl-policy)#color 1  | Map the color with the SR policy to be used..  | 
(config-tnl-policy)#exit   | Exiting tunnel policy mode  | 
(config)# tunnel-policy PE1-P2-PE3  | Configure tunnel policy  | 
(config-tnl-policy)#color 2  | Map the color with the SR policy to be used..  | 
(config-tnl-policy)#exit   | Exiting tunnel policy mode  | 
(config)# mpls l2-circuit pe1-to-pe3 2002 10.143.73.3  | Configure the VC for PE3.  In this  example, pe1-to-pe3 is the VC name, 2002 is the VC ID, and 10.143.73.3 is the VC endpoint IP address.  | 
(config-pseudowire)# tunnel-select-policy PE1-P1-PE3  | Configure Tunnel-Policy on VC pe1-to-pe3  | 
(config-pseudowire)#exit  | Exit pseudowire config mode.  | 
(config)#exit   | Exiting from config mode  | 
(config)#service-template pe1-to-pe3  | Template configuration.  | 
(config-svc)# match outer-vlan 2002  | Match criteria under template configuration  | 
(config)#exit   | Exiting from config mode  | 
(config)# mpls vpls vpls-pe1-to-pe3pe4-1 2502  | Enter VPLS config mode  | 
(config-vpls)#signaling ldp  | Define Signaling as LDP  | 
(config-vpls-sig)#vpls-type ethernet  | Type ethernet configuration for VPLS  | 
(config-vpls-sig)# vpls-peer 10.143.73.3 tunnel-select-policy PE1-P2-PE3  | Configure VPLS Peer with tunnel-policy  | 
(config-vpls-sig)#exit-signaling  | Exit Signaling LDP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#service-template vpls-pe1-to-pe3pe4-1  | Template configuration.  | 
(config-svc)# match outer-vlan 2502  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress translate 2600 outgoing-tpid dot1.q   | Action performed for service template.  | 
(config)# mpls vpls vpls-pe1-to-pe3pe4-2 2503  | Enter VPLS config mode  | 
(config-vpls)#signaling bgp  | Enter the Signaling bgp mode for BGP VPLS.  | 
(config-vpls-sig)# ve-id 3  | Configure VE ID, which is mandatory for BGP VPLS, otherwise, signaling does not take place. VE ID should be unique per VPLS instance  | 
(config-vpls-sig)# tunnel-select-policy PE1-P1-PE3  | Configure tunnel-policy for a VPLS instance  | 
(config-vpls-sig)#exit-signaling  | Exit Signaling LDP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#service-template vpls-pe1-to-pe3pe4-2  | Template configuration.  | 
(config-svc)# match double-tag outer-vlan 2503 inner-vlan 2504  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress push 2505  | Action performed for service template.  | 
(config)#mac vrf vrf2  | Enter VRF mode  | 
(config-vrf)# tunnel-select-policy PE1-P1-PE3  | Map tunnel policy to mac vrf  | 
(config-vrf)#rd 10.143.73.1:2  | Configuring Route-Distinguisher value 10.143.73.1:2  | 
(config-vrf)#route-target both 2:2   | Configuring import and export value as 2:2  | 
(config-vrf)#exit   | Exiting VRF Mode.  | 
(config)#mac vrf elan500  | Enter VRF mode  | 
(config-vrf)#rd 10.143.73.1:500  | Configuring Route-Distinguisher value 10.143.73.1:500  | 
(config-vrf)#route-target both 500:500  | Configuring import and export value as 500:500  | 
(config)# ip vrf vrf600  | Enter VRF mode  | 
(config-vrf)# tunnel-select-policy PE1-P1-PE3  | Configure tunnel-policy to be used for the VRF.  | 
(config-vrf)# rd 10.143.73.1:600  | Configuring Route-Distinguisher value 10.143.73.1:600  | 
(config-vrf)#route-target both 600:600  | Configuring import and export value as 600:600  | 
(config-vrf)#exit   | Exiting VRF Mode.  | 
(config)#evpn mpls id 2 xconnect target-mpls-id 252   | Configure the EVPN-ELINE identifier with source identifier 2 and target identifier 252.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrf2   | Mapping vrf "vrf2" to EVPN-VPWS identifier.  | 
(config-evpn-mpls)#exit  | Exiting from evpn-mpls mode  | 
(config)# evpn mpls id 500  | Configure evpn mpls id 500  | 
(config-evpn-mpls)#tunnel-select-policy PE1-P2-PE3  | Map tunnel-policy to EVI  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp elan500  | Mapping vrf " elan500" to EVPN-VPLS identifier.  | 
(config)#interface xe8  | Enter the Interface mode for xe8  | 
(config-if)# switchport  | Configure interface as switch port  | 
(config-if)# mpls-l2-circuit pe1-to-pe3 service-template pe1-to-pe3 primary  | Bind the interface to the VC with service template  | 
(config-if)# mpls-vpls vpls-pe1-to-pe3pe4-1 service-template vpls-pe1-to-pe3pe4-1  | Bind the VPLS instance to the interface  | 
(config-if-vpls)# exit-if-vpls  | Exit VPLS attachment-circuit mode  | 
(config-if)# mpls-vpls vpls-pe1-to-pe3pe4-2 service-template vpls-pe1-to-pe3pe4-2  | Bind the VPLS instance to the interface  | 
(config-if-vpls)#split-horizon group access1  | Configure split-horizon group on VPLS  | 
(config-if-vpls)# exit-if-vpls  | Exit VPLS attachment-circuit mode  | 
(config-if)# exit  | Exit from the interface  | 
(config)#interface xe8.2 switchport  | Configure  Interface xe8.2 as switchport  | 
(config-if)#encapsulation dot1q 2   | Setting Encapsulation to dot1q with VLAN ID 2  | 
(config-if)#access-if-evpn   | Entering Access mode for EVPN MPLS ID configuration.  | 
(config-access-if)#map vpn-id 2   | Map vpn-id 2 to interface xe8.2 (VPWS).  | 
(config-access-if)#exit   | Exiting out of access interface mode.  | 
(config)#interface xe8.500 switchport  | Configure  Interface xe8.500 as switchport  | 
(config-if)#encapsulation dot1q 500   | Setting Encapsulation to dot1q with VLAN ID 500  | 
(config-if)#access-if-evpn   | Entering Access mode for EVPN MPLS ID configuration.  | 
(config-access-if)#map vpn-id 500   | Map vpn-id 500 to interface xe8.500 (VPLS).  | 
(config-access-if)#exit   | Exiting out of access interface mode.  | 
(config)#interface xe8.600  | Enter Interface  mode xe8.600   | 
(config-if)# ip vrf forwarding vrf600  | Bind the VRF instance to the interface  | 
(config-if)# ip address 170.1.1.1/24  | Configure IP address  | 
(config-if)# ipv6 address 1111::1/64  | Configure ipv6 address  | 
(config-if)#encapsulation dot1q 600   | Setting Encapsulation to dot1q with VLAN ID 600  | 
(config-if)#exit   | Exiting interface Mode.  | 
(config)# router bgp 100  | Enter BGP router mode  | 
(config-router)#address-family ipv4 vrf vrf600   | Configure VRF address family  | 
(config-router-af)redistribute connected   | Redistribute connected router  | 
(config-router-af)#neighbor 170.1.1.2 remote-as 200  | Configure neighbor with remote-as  | 
(config-router-af)#neighbor 170.1.1.2 activate  | Activate the VPN neighbour  | 
(config-router-af)exit-address-family   | Exit VRF address family  | 
(config-router)#address-family ipv6 vrf vrf600  | Configure ipv6 VRF address family  | 
(config-router-af)redistribute connected   | Redistribute connected router  | 
(config-router-af)#neighbor 1111::2 remote-as 200  | Configure neighbor with remote-as  | 
(config-router-af)#neighbor 1111::2 activate  | Activate the VPN neighbour  | 
(config-router-af)exit-address-family   | Exit VRF address family  | 
(config-router-af)exit  | End  | 
(config-router)#commit  | Commit the candidate configuration to the running configuration  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)#ip address 10.143.73.5/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#prefix-sid index 5  | Configure prefix sid index value  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe15  | Enter the Interface mode for xe15  | 
(config-if)# ip address 10.255.128.3/31  | Configure IP address on the interface.  | 
(config-if)# mtu 9900  | Configure mtu  | 
(config-if)# label-switching  | Enable label switching on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe7  | Enter the Interface mode for xe7.  | 
(config-if)# ip address 10.255.128.23/31  | Configure IP address on the interface.  | 
(config-if)# label-switching  | Enable label switching on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 100  | Enter the Router OSPF mode.  | 
(config-router)#ospf router-id 10.143.73.5  | Router-id configurations   | 
(config-router)# bfd all-interfaces  | Enable the OSPF enabled interfaces with bfd  | 
(config-router)# network 10.143.73.5/32 area   | |
0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# network 10.255.128.2/31 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# network 10.255.128.22/31 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# ospf segment-routing global block 16000 17000   | Enable SRGB under ospf process 100  | 
(config-router)#segment-routing mpls   | Enable segment routing  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)#commit  | Commit the candidate configuration to the running configuration  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)#ip address 10.143.73.6/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#prefix-sid index 6  | Configure prefix sid index value  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe4  | Enter the Interface mode for xe4  | 
(config-if)# ip address 10.255.128.11/31  | Configure IP address on the interface.  | 
(config-if)# mtu 9900  | Configure mtu  | 
(config-if)# label-switching  | Enable label switching on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe5  | Enter the Interface mode for xe5.  | 
(config-if)# ip address 10.255.128.25/31  | Configure IP address on the interface.  | 
(config-if)# label-switching  | Enable label switching on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 100  | Enter the Router OSPF mode.  | 
(config-router)#ospf router-id 10.143.73.6  | Router-id configurations   | 
(config-router)# bfd all-interfaces  | Enable the OSPF enabled interfaces with bfd  | 
(config-router)# network 10.143.73.6/32 area   | |
0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# network 10.255.128.10/31 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# network 10.255.128.24/31 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# ospf segment-routing global block 16000 17000   | Enable SRGB under ospf process 100  | 
(config-router)#segment-routing mpls   | Enable segment routing  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)#commit  | Commit the candidate configuration to the running configuration  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)# ip address 10.143.73.3/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#prefix-sid index 3  | Configure prefix sid index value  | 
(config-if)#exit  | Exit interface mode  | 
#configure terminal   | Enter configuration mode.  | 
(config)#evpn mpls enable  | Enable EVPN MPLS. Note: Reload is required after Enabling/ Disabling EVPN MPLS Feature.  | 
(config)#evpn mpls vtep-ip-global 10.143.73.3  | Configuring vtep global ip to loopback IP.  | 
(config)#commit  | Commit the candidate configuration to the running configuration  | 
(config)#end  | End configuration mode  | 
#write memory  | Saving configs to startup config  | 
#reload  | Reload device after enabling evpn  | 
(config)#router ldp  | Enter the Router LDP mode.  | 
(config-router)#router-id 10.143.73.3  | Set the router ID to IP address 10.143.73.3.  | 
(config-router)#transport-address ipv4 10.143.73.3  |  Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface.  | 
(config-router)# targeted-peer ipv4 10.143.73.1  | Configure targeted peer  | 
(config-router-targeted-peer)# exit-targeted-peer-mode  | Exit from router target peer and LDP mode   | 
(config)#interface xe5  | Enter the Interface mode for xe5  | 
(config-if)# ip address 10.255.128.24/31  | Configure IP address on the interface.  | 
(config-if)#mtu 9900  | Configure mtu at interface level  | 
(config-if)# label-switching  | Enable label switching on the interface.  | 
(config-if)# enable-ldp ipv4  | Enable ldp on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe7  | Enter the Interface mode for xe7.  | 
(config-if)# ip address 10.255.128.22/31  | Configure IP address on the interface.  | 
(config-if)# label-switching  | Enable label switching on the interface.  | 
(config-if)# enable-ldp ipv4  | Enable ldp on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 100  | Enter the Router OSPF mode.  | 
(config-router)#ospf router-id 10.143.73.3  | Router-id configurations   | 
(config-router)# bfd all-interfaces  | Enable the OSPF enabled interfaces with bfd  | 
(config-router)# network 10.143.73.3/32 area 0.0.0.0  | Advertise loopback address in OSPF.  | 
(config-router)# network 10.255.128.22/31 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# network 10.255.128.24/31 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config-router)# ospf segment-routing global block 16000 17000   | Enable SRGB under ospf process 100  | 
(config-router)#segment-routing mpls   | Enable segment routing  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)# router bgp 100   | Enter the Router BGP mode, ASN: 100.  | 
(config-router)# neighbor 10.143.73.1 remote-as 100  | Configuring PE3 as iBGP neighbor using it's loopback ip.  | 
(config-router)# neighbor 10.143.73.1 fall-over bfd multihop  | Configure neighbor bfd multihop   | 
(config-router)# neighbor 10.143.73.1 update-source lo  | Source of routing updates as loopback  | 
(config-router)# neighbor 10.143.73.1 advertisement-interval 0  | Configure advertisement interval  | 
(config-router)# address-family vpnv4 unicast  | Enter VPNv4 Address family mode  | 
(config-router-af)# neighbor 10.143.73.1 activate  | Enabling VPNv4 Address family for neighbor..  | 
(config-router-af)# exit-address-family   | Exit Address-family mode.  | 
(config-router)# address-family l2vpn vpls  | Enter l2vpn Address family mode  | 
(config-router-af)# neighbor 10.143.73.1 activate  | Enabling l2vpn Address family for neighbor..  | 
(config-router-af)# exit-address-family   | Exit Address-family mode.  | 
(config-router)# address-family l2vpn evpn  | Enter evpn Address family mode  | 
(config-router-af)# neighbor 10.143.73.1 activate  | Enabling evpn  Address family for neighbor..  | 
(config-router-af)# exit-address-family   | Exit Address-family mode.  | 
(config-router)# address-family vpnv6 unicast  | Enter VPNv6 Address family mode  | 
(config-router-af)# neighbor 10.143.73.1 activate  | Enabling VPNv6 Address family for neighbor..  | 
(config-router-af)# exit-address-family   | Exit Address-family mode.  | 
(config)# mpls l2-circuit pe3-to-pe1 2002 10.143.73.1  | Configure the VC for PE-1. In this example, pe3-to-pe1  is the VC name, 2002 is the VC ID, and  10.143.73.1 is the VC endpoint IP address.  | 
(config)#exit   | Exiting from config mode  | 
(config)#service-template pe3-to-pe1  | Template configuration.  | 
(config-svc)# match outer-vlan 2002  | Match criteria under template configuration  | 
(config)#exit   | Exiting from config mode  | 
(config)# mpls vpls vpls-pe3-to-pe1pe4-1 2502  | Enter VPLS config mode  | 
(config-vpls)#signaling ldp  | Define Signaling as LDP  | 
(config-vpls-sig)#vpls-type Ethernet  | Type ethernet configuration for VPLS  | 
(config-vpls-sig)# vpls-peer 10.143.73.1  | Configure VPLS Peer  | 
(config-vpls-sig)#exit-signaling  | Exit Signaling LDP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#service-template vpls-pe3-to-pe1pe4-1  | Template configuration.  | 
(config-svc)# match outer-vlan 2502  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress translate 2600 outgoing-tpid dot1.q   | Action performed for service template.  | 
(config)# mpls vpls vpls-pe3-to-pe1pe4-2 2503  | Enter VPLS config mode  | 
(config-vpls)#signaling bgp  | Enter the Signaling bgp mode for BGP VPLS.  | 
(config-vpls-sig)# ve-id 4  | Configure VE ID, which is mandatory for BGP VPLS, otherwise, signaling does not take place. VE ID should be unique per VPLS instance  | 
(config-vpls-sig)#exit-signaling  | Exit Signaling LDP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#service-template vpls-pe3-to-pe1pe4-2  | Template configuration.  | 
(config-svc)# match double-tag outer-vlan 2503 inner-vlan 2504  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress push 2505  | Action performed for service template.  | 
(config)#mac vrf vrf2  | Enter VRF mode  | 
(config-vrf)#rd 10.143.73.3:2  | Configuring Route-Distinguisher value 10.143.73.3:2  | 
(config-vrf)#route-target both 2:2   | Configuring import and export value as 2:2  | 
(config-vrf)#exit   | Exiting VRF Mode.  | 
(config)#mac vrf elan500  | Enter VRF mode  | 
(config-vrf)#rd 10.143.73.3:500  | Configuring Route-Distinguisher value 10.143.73.3:500  | 
(config-vrf)#route-target both 500:500  | Configuring import and export value as 500:500  | 
(config)# ip vrf vrf600  | Enter VRF mode  | 
(config-vrf)# rd 10.143.73.3:600  | Configuring Route-Distinguisher value 10.143.73.3:600  | 
(config-vrf)#route-target both 600:600  | Configuring import and export value as 600:600  | 
(config-vrf)#exit   | Exiting VRF Mode.  | 
(config)#evpn mpls id 252 xconnect target-mpls-id 2  | Configure the EVPN-ELINE identifier with source identifier 252 and target identifier 2.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrf2   | Mapping vrf "vrf2" to EVPN-VPWS identifier.  | 
(config-evpn-mpls)#exit  | Exiting from evpn-mpls mode  | 
(config)# evpn mpls id 500  | Configure evpn mpls id 500  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp elan500  | Mapping vrf " elan500" to EVPN-VPLS identifier.  | 
(config)#interface xe4  | Enter the Interface mode for xe8  | 
(config-if)# switchport  | Configure interface as switch port  | 
(config-if)# mpls-l2-circuit pe3-to-pe1 service-template pe3-to-pe1 primary  | Bind the VPWS instance to the interface  | 
(config-if)# mpls-vpls vpls-pe3-to-pe1pe4-1 service-template vpls-pe3-to-pe1pe4-1  | Bind the VPLS instance to the interface  | 
(config-if-vpls)# exit-if-vpls  | Exit VPLS attachment-circuit mode  | 
(config-if)# mpls-vpls vpls-pe3-to-pe1pe4-2 service-template vpls-pe3-to-pe1pe4-2  | Bind the VPLS instance to the interface  | 
(config-if-vpls)# exit-if-vpls  | Exit VPLS attachment-circuit mode  | 
(config-if)# exit  | Exit from the interface  | 
(config)#interface xe4.2 switchport  | Configure  Interface xe4.2 as switchport  | 
(config-if)#encapsulation dot1q 2   | Setting Encapsulation to dot1q with VLAN ID 2  | 
(config-if)#access-if-evpn  | Entering Access mode for EVPN MPLS ID configuration.  | 
(config-access-if)#map vpn-id 252  | Map vpn-id 252 to interface xe4.2 (VPWS).  | 
(config-access-if)#exit   | Exiting out of access interface mode.  | 
(config)#interface xe4.500 switchport  | Configure  Interface xe4.500 as switchport  | 
(config-if)#encapsulation dot1q 500   | Setting Encapsulation to dot1q with VLAN ID 500  | 
(config-if)#access-if-evpn  | Entering Access mode for EVPN MPLS ID configuration.  | 
(config-access-if)#map vpn-id 500   | Map vpn-id 500 to interface xe4.500 (VPLS).  | 
(config-access-if)#exit   | Exiting out of access interface mode.  | 
(config)#interface xe4.600  | Enter Interface  mode xe4.600   | 
(config-if)# ip vrf forwarding vrf600  | Bind the VRF instance to the interface  | 
(config-if)# ip address 180.1.1.1/24  | Configure IP address  | 
(config-if)# ipv6 address 2222::1/64  | Configure ipv6 address  | 
(config-if)#encapsulation dot1q 600   | Setting Encapsulation to dot1q with VLAN ID 600  | 
(config-if)#exit   | Exiting interface Mode.  | 
(config)# router bgp 100  | Enter BGP router mode  | 
(config-router)#address-family ipv4 vrf vrf600   | Configure VRF address family  | 
(config-router-af)redistribute connected   | Redistribute connected router  | 
(config-router-af)#neighbor 180.1.1.2 remote-as 300  | Configure neighbor with remote-as  | 
(config-router-af)#neighbor 180.1.1.2 activate  | Activate the VPN neighbour  | 
(config-router-af)exit-address-family   | Exit VRF address family  | 
(config-router)#address-family ipv6 vrf vrf600  | Configure ipv6 VRF address family  | 
(config-router-af)redistribute connected   | Redistribute connected router  | 
(config-router-af)#neighbor 2222::2 remote-as 300  | Configure neighbor with remote-as  | 
(config-router-af)#neighbor 2222::2 activate  | Activate the VPN neighbour  | 
(config-router-af)exit-address-family   | Exit VRF address family  | 
(config-router-af)end  | End  | 
(config)#commit   | Commit the candidate configuration to the running configuration  |