
#configure terminal  | Enter configuration mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 101.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 101:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target export 101:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#route-target import 102:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target import 103:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode.  | 
(config)#evpn mpls enable  | Enable the evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 101.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit the EVPN MPLS mode and return to the configure mode.  | 
(config)#interface xe6.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 1000  | Map interface to ethernet virtual network identifier.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router rsvp  | Enable RSVP in the PE  | 
(config)#interface xe5  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 10.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#rsvp-trunk t1_PE2  | Configure RSVP trunk.  | 
(config-trunk)#from 101.1.1.1  | Assign the source loopback address to the RSVP trunk  | 
(config-trunk)#to 102.1.1.1  | Assign the source loopback address to the to the RSVP trunk  | 
(config-trunk)#exit  | Exit RSVP trunk mode.  | 
(config)#rsvp-trunk t1_PE3  | Configure RSVP trunk.  | 
(config-trunk)#from 101.1.1.1  | Assign the source loopback address to the RSVP trunk  | 
(config-trunk)#to 103.1.1.1  | Assign the source loopback address to the to the RSVP trunk  | 
(config-trunk)#exit  | Exit RSVP trunk mode.  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 101.1.1.1  | Configure router-id.  | 
(config-router)#network 101.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 10.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 102.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 102.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 102.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode.  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit the transaction.  | 
(config)#exit  | Exit the config mode.  | 
#configure terminal  | Enter configuration mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config)#router rsvp  | Configure RSVP.  | 
(config)#interface xe4  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 30.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable LDP.  | 
(config)#interface xe6  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 10.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable LDP.  | 
(config)#interface xe7  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 20.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable LDP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe74  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 30.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 101.1.1.1  | Configure router-id.  | 
(config-router)#network 7.7.7.7/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 10.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#network 20.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#network 30.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit the transaction  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 102.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 102:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target import 101:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target export 102:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode  | 
(config)#evpn mpls enable  | Enable evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 102.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit the EVPN MPLS mode and return to the configure mode.  | 
(confi)#interface xe6.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#access-if-evpn  | Enter access mode for EVPN MPLS ID configuration  | 
(config-if)#map vpn-id 1000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router ldp  | Enable LDP in the PE.  | 
(config-router)#router-id 102.1.1.1  | Set the router ID to IP address 102.1.1.1.  | 
config-router)#transport-address ipv4  102.1.1.1  | Set the IPv4 transport address for the label space.  | 
(config)#interface xe5  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 20.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable LDP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#rsvp-trunk t1_PE1 ipv4  | Configure RSVP trunk.  | 
(config-trunk)#from 102.1.1.1  | Assign the source loopback address to the to the RSVP trunk  | 
(config-trunk)#to 101.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config-trunk)#exit  | Exit RSVP trunk mode.  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 102.1.1.1  | Configure router-id.  | 
(config-router)#network 102.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 10.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode.  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 103.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 103:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target import 101:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target export 103:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode  | 
(config)#evpn mpls enable  | Enable evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 103.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit the EVPN MPLS mode and return to the configure mode.  | 
(config)#interface xe3.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#access-if-evpn  | Enter access mode for EVPN MPLS ID configuration.  | 
(config-if)#map vpn-id 1000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router ldp  | Enable LDP in the PE.  | 
(config-router)#router-id 103.1.1.1  | Set the router ID for IP address 103.1.1.1  | 
(config-router)#transport-address ipv4  103.1.1.1  | Set the IPv4 transport address for the label space.  | 
(config)#interface xe4  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 30.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable LDP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#rsvp-trunk t1_PE1 ipv4  | Configure RSVP trunk.  | 
(config-trunk)#from 103.1.1.1  | Assign the source loopback address to the to the RSVP trunk  | 
(config-trunk)#to 101.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config-trunk)#exit  | Exit RSVP trunk mode.  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 103.1.1.1  | Configure router-id.  | 
(config-router)#network 103.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 30.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit  | Exit the transaction  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 

#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 101.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 101:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target export 101:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#route-target import 104:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target import 105:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode.  | 
(config)#evpn mpls enable  | Enable the evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 101.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit the EVPN MPLS mode and return to the configure mode.  | 
(config)#interface xe6.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 1000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router ldp  | Enable LDP in the PE  | 
(config-router)#router-id 101.1.1.1  | Set the router ID to IP address 101.1.1.1  | 
(config-router)#transport-address ipv4 101.1.1.1  | Configure transport address  | 
(config-router)#exit  | Exit router mode  | 
(config)#interface xe5  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 10.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable ldp  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 101.1.1.1  | Configure router-id.  | 
(config-router)#network 101.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 10.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config)#allocate-label all  |  Configure allocate all under router bgp   | 
(config-router)#neighbor 102.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 102.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 104.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 104.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 105.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 105.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 104.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 102.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 102.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 102.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 labeled-unicast address family  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 104.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 105.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode.  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit the transaction.  | 
(config)#exit  | Exit the config mode.  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)#ip address 102.1.1.1/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#commit  | Commit the transaction.  | 
(config)#router ldp  | Enter the Router LDP mode.  | 
(config-router)#router-id 102.1.1.1  | Set the router ID to IP address 102.1.1.1  | 
(config-router)#transport-address ipv4 102.1.1.1  | Configure transport address  | 
(config-router)#commit  | Commit the transaction.  | 
(config)#interface xe6  | Enter the Interface mode for xe3.  | 
(config-if)#ip address 10.1.1.2/24  | Configure IP address on the interface.  | 
(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
(config-if)#label-switching  | Enable label switching on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe1  | Enter the Interface mode for xe5  | 
(config-if)#ip address 20.1.1.1/31  | Configure IP address on the interface.  | 
(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
(config-if)#label-switching  | Enable label switching on the interface.  | 
(config-if)#commit  | Commit the transaction.  | 
(config)#enable ext-ospf-multi-inst   | Enable multiple-instance capability  | 
(config)#router ospf 1  | Enter the Router OSPF mode.  | 
(config-router)#ospf router-id 102.1.1.1  | Setting the Router ID as Loopback IP   | 
(config-router)#network 102.1.1.1/32 area 0.0.0.0 instance-id 2  | Advertise loopback address in OSPF.  | 
(config-router)#network 20.1.1.0/24 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config)#router ospf 2  | Enter the Router OSPF mode.  | 
(config-router)#network 10.1.1.0/24 area 0.0.0.0 instance-id 1  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)#commit   | Commit candidate configuration to be running configuration  | 
(config)#router bgp 1  | Enter the Router BGP mode, ASN: 1  | 
(config)#allocate-label all  |  Configure allocate all under router bgp   | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 102.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 101.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 101.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 103.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 103.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 labeled-unicast address family  | 
(config-router)#exit  | Exit the config mode.  | 
(config)#commit  | Commit the transaction.  | 
(config)#exit  | Exit the config mode.  | 
#configure terminal  | Enter configuration mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 103.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config)#router ldp  | Configure ldp.  | 
(config-router)#router-id 103.1.1.1  | Set the router ID to IP address 103.1.1.1  | 
(config-router)#transport-address ipv4 103.1.1.1  | Configure transport address  | 
(config)#interface xe4  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 30.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp  | Enable RSVP.  | 
(config)#interface xe1  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 20.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp  | Enable ldp  | 
(config)#interface xe7  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 40.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#enable ext-ospf-multi-inst   | Enable multiple-instance capabilit  | 
(config)#router ospf 2  | Enter OSPF router mode  | 
(config-router)#ospf router-id 103.1.1.1  | Configure router-id.  | 
(config-router)#network 103.1.1.1/32 area 0.0.0.0 instance-id 3  | Advertise the loopback address in area 0.  | 
(config-router)#network 20.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config)#router ospf 3  | Enter the Router OSPF mode.  | 
(config-router)#network 30.1.1.0/24 area 0.0.0.0 instance-id 2  | Advertise the network address in area 0  | 
(config-router)#network 40.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit the transaction  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
(config)#router bgp 1  | Enter the Router BGP mode, ASN: 1  | 
(config)#allocate-label all  |  Configure allocate all under router bgp   | 
(config-router)#neighbor 102.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 102.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 104.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 104.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 105.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 105.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 103.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 102.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 102.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 102.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)#neighbor 104.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 104.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 104.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)#neighbor 105.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 105.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 105.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 labeled-unicast address family  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
#configure terminal  | Enter configuration mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 104.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 104:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target import 101:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target export 104:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode  | 
(config)#evpn mpls enable  | Enable evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 104.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit the EVPN MPLS mode and return to the configure mode.  | 
(config)#int xe6.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 10000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router ldp  | Enable ldp in the PE  | 
(config-router)#router-id 104.1.1.1  | Set the router ID to IP address 104.1.1.1  | 
(config-router)#transport-address ipv4 104.1.1.1  | Configure transport address  | 
(config)#interface xe5  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 30.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable ldp  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 3  | Enter OSPF router mode  | 
(config-router)#ospf router-id 104.1.1.1  | Configure router-id.  | 
(config-router)#network 104.1.1.1/32 area 0.0.0.2  | Advertise the loopback address in area 0.  | 
(config-router)#network 30.1.1.0/24 area 0.0.0.2  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 104.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode.  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 105.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 105:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target import 101:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target export 105:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode  | 
(config)#evpn mpls enable  | Enable evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 105.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit the EVPN MPLS mode and return to the configure mode.  | 
(config)#interface xe3.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 1000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router ldp  | Enable RSVP in the PE  | 
(config-router)#router-id 105.1.1.1  | Set the router ID to IP address 105.1.1.1  | 
(config-router)#transport-address ipv4 105.1.1.1  | Configure transport address  | 
(config)#interface xe4  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 40.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 3  | Enter OSPF router mode  | 
(config-router)#ospf router-id 105.1.1.1  | Configure router-id.  | 
(config-router)#network 105.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 40.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 105.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit  | Exit the transaction  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 

#configure terminal  | Enter configure mode.  | 
(config)#bridge 1 protocol ieee vlan-bridge  | Configure IEEE VLAN bridge  | 
(config)#vlan 2-100 bridge 1 state enable  | Configure VLANs from 2-100 and associate them with bridge 1  | 
(config)#interface xe5  | Enter Interface mode  | 
(config-if)#switchport  | Make eth5 an L2 port  | 
(config-if)#bridge-group 1  | Associate eth5 to bridge 1  | 
(config-if)#switchport mode trunk  | Configure eth5 as a trunk port  | 
(config-if)#switchport trunk allowed vlan all  | Allow all configured VLANs on eth5  | 
(config-if)#exit  | Exit Interface mode and return to Configure mode.  | 
(config)#interface xe6  | Enter interface mode  | 
(config-if)#switchport  | Make eth6 an L2 port  | 
(config-if)#bridge-group 1  | Associate eth6 to bridge 1  | 
(config-if)#switchport mode trunk  | Configure eth6 as a trunk port  | 
(config-if)#switchport trunk allowed vlan all  | Allow all configured VLANs on eth6  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#interface po1  | Enter interface mode and configure LAG interface  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
#configure terminal  | Enter configure mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 101.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 101:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target export 101:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#route-target import 103:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target import 104:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode.  | 
(config)#evpn mpls vtep-ip-global 101.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit EVPN MPLS mode.  | 
(config-if)#int eth4.1  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 1000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#mac 0000.0000.1001  | Advertise static MAC-only route in the access-circuit.  | 
(config-if)#mac 0000.0000.1002 ip 11.11.11.1  | Advertise static MAC-IPv4 route in the access-circuit.  | 
(config-if)#mac 0000.0000.1003 ipv6 1001::1  | Advertise static MAC-IPv6 route in the access-circuit.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router rsvp  | Enable RSVP in the PE  | 
(config)#interface xe1  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 10.0.0.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe2  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 40.0.0.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#rsvp-path p1  | Configure RSVP path.  | 
(config-path)#10.0.0.2 loose  | Configure the nexthop address in the connected subnet  | 
(config-path)#exit  | Exit RSVP path mode  | 
(config)#rsvp-path p2  | Configure RSVP path.  | 
(config-path)#40.0.0.2 loose  | Configure the nexthop address in the connected subnet  | 
(config-path)#exit  | Exit RSVP path mode  | 
(config)#rsvp-trunk t1  | Configure RSVP trunk.  | 
(config-trunk)#primary path p1  | Associate RSVP path.  | 
(config-trunk)#from 101.1.1.1  | Assign the source loopback address to the  RSVP trunk  | 
(config-trunk)#to 103.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config-trunk)#exit  | Exit RSVP path mode.  | 
(config)#rsvp-trunk t2  | Create RSVP trunk.  | 
(config-trunk)#primary path p2  | Set the primary path  | 
(config-trunk)#from 101.1.1.1  | Assign the source loopback address to the to the RSVP trunk  | 
(config-trunk)#to 104.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 101.1.1.1  | Configure router-id.  | 
(config-router)#network 101.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 10.0.0.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#network 40.0.0.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 102.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 102.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 104.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 104.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 102.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 104.1.1.1 activate  | Activate the neighbor  | 
(config-router)#exit  | Exit BGP router mode.  | 
(config)#evpn multihoming enable  | Enable EVPN multi-homing  | 
(config)#int po1  | Enter interface mode  | 
(config-if)#evpn multi-homed system-mac 00:00:00:00:00:00:00:11:22  | Make the interface multi-homed and set an Ethernet Segment Identifier (ESI)  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#int xe4  | Enter interface mode  | 
(config-if)#channel-group 1 mode active  | Add member to the LAG interface  | 
(config-if)#exit  | Exit the interface mode.  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
#configure terminal  | Enter configure mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 102.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 102:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target export 102:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#route-target import 103:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target import 104:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode.  | 
(config)#evpn mpls vtep-ip-global 102.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit EVPN MPLS mode.  | 
(config-if)#int xe4.1  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 1000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#mac 0000.0000.2001  | Advertise static MAC-only route in the access-circuit.  | 
(config-if)#mac 0000.0000.2002 ip 12.12.12.1  | Advertise static MAC-IPv4 route in the access-circuit.  | 
(config-if)#mac 0000.0000.2003 ipv6 2001::1  | Advertise static MAC-IPv6 route in the access-circuit.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router rsvp  | Enable RSVP in the PE  | 
(config)#interface xe3  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 20.0.0.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe5  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 50.0.0.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#rsvp-path p1  | Configure RSVP path.  | 
(config-path)#20.0.0.2 loose  | Configure the nexthop address in the connected subnet  | 
(config-path)#exit  | Exit RSVP path mode.  | 
(config)#rsvp-path p2  | Configure RSVP path.  | 
(config-path)#50.0.0.2 loose  | Configure the nexthop address in the connected subnet  | 
(config-path)#exit  | Exit RSVP path mode.  | 
(config)#rsvp-trunk t1  | Configure RSVP trunk.  | 
(config-trunk)#primary path p1  | Associate RSVP path.  | 
(config-trunk)#from 102.1.1.1  | Assign the source loopback address to the to the RSVP trunk  | 
(config-trunk)#to 103.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config-trunk)#exit  | Exit RSVP trunk mode.  | 
(config)#rsvp-trunk t2  | Configure RSVP trunk.  | 
(config-trunk)#primary path p2  | Associate RSVP path.  | 
(config-trunk)#from 102.1.1.1  | Assign the source loopback address to the to the RSVP trunk  | 
(config-trunk)#to 104.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 102.1.1.1  | Configure router-id.  | 
(config-router)#network 102.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 20.0.0.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#network 50.0.0.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF process  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 104.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 104.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 104.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode  | 
(config-router)#exit  | Exit BGP router mode  | 
(config)#evpn multihoming enable  | Enable EVPN multi-homing  | 
(config)#int po1  | Enter interface mode.  | 
(config-if)#evpn multi-homed esi 00:00:00:00:00:00:00:11:22  | Make the interface multi-homed and set an Ethernet Segment Identifier (ESI)  | 
(config-if)#exit  | Exit interface mode  | 
(config)#int xe4  | Enter interface mode  | 
(config-if)#channel-group 1 mode active  | Add member to the LAG interface  | 
(config-if)#exit  | Exit the interface mode.  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
#configure terminal  | Enter configure mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 103.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 103:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target export 103:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#route-target import 101:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target import 102:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode.  | 
(config)#evpn mpls vtep-ip-global 103.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit EVPN MPLS mode.  | 
(config)#router rsvp  | Enable RSVP in the PE  | 
(config)#interface xe3  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 20.0.0.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe1  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 10.0.0.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#rsvp-path p1  | Configure RSVP path.  | 
(config-path)#10.0.0.1 loose  | Configure the nexthop address in the connected subnet  | 
(config-path)#exit  | Exit RSVP path mode  | 
(config)#rsvp-path p2  | Configure RSVP path.  | 
(config-path)#20.0.0.1 loose  | Configure the nexthop address in the connected subnet  | 
(config-path)#exit  | Exit RSVP path mode  | 
(config)#rsvp-trunk t1  | Configure RSVP trunk.  | 
(config-trunk)#primary path p1  | Associate the RSVP path.  | 
(config-trunk)#from 103.1.1.1  | Assign the source loopback address to the RSVP trunk  | 
(config-trunk)#to 101.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config-trunk)#exit  | Exit RSVP trunk mode.  | 
(config)#rsvp-trunk t2  | Configure RSVP trunk.  | 
(config-trunk)#primary path p2  | Associate the RSVP path.  | 
(config-trunk)#from 103.1.1.1  | Assign the source loopback address to the RSVP trunk  | 
(config-trunk)#to 102.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 103.1.1.1  | Configure router-id.  | 
(config-router)#network 103.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 10.0.0.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#network 20.0.0.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 102.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 102.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 102.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode  | 
(config-router)#exit  | Exit BGP router mode  | 
(config)#evpn multihoming enable  | Enable EVPN multi-homing  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
#configure terminal  | Enter configure mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 104.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 104:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target export 104:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#route-target import 101:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target import 102:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode.  | 
(config)#evpn mpls vtep-ip-global 104.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit EVPN MPLS mode.  | 
(config)#router rsvp  | Enable RSVP in the PE  | 
(config)#interface xe2  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 40.0.0.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe5  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 50.0.0.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#rsvp-path p1  | Configure RSVP path.  | 
(config-path)#40.0.0.1 loose  | Configure the nexthop address in the connected subnet  | 
(config-path)#exit  | Exit RSVP path mode  | 
(config)#rsvp-path p2  | Configure RSVP path.  | 
(config-path)#50.0.0.1 loose  | Configure the nexthop address in the connected subnet  | 
(config-path)#exit  | Exit RSVP path mode  | 
(config)#rsvp-trunk t1  | Configure RSVP trunk.  | 
(config-trunk)#primary path p1  | Associate the RSVP path.  | 
(config-trunk)#from 104.1.1.1  | Assign the source loopback address to the RSVP trunk  | 
(config-trunk)#to 101.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config-trunk)#exit  | Exit RSVP trunk mode.  | 
(config)#rsvp-trunk t2  | Configure RSVP trunk.  | 
(config-trunk)#primary path p2  | Associate the RSVP path.  | 
(config-trunk)#from 104.1.1.1  | Assign the source loopback address to the RSVP trunk  | 
(config-trunk)#to 102.1.1.1  | Assign the destination loopback address to the RSVP trunk  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 103.1.1.1  | Configure router-id.  | 
(config-router)#network 103.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 40.0.0.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#network 50.0.0.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 102.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 102.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 102.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode  | 
(config-router)#exit  | Exit BGP router mode  | 
(config)#evpn multihoming enable  | Enable EVPN multi-homing  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 

#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 101.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 101:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target export 101:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#route-target import 104:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target import 105:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode.  | 
(config)#evpn mpls enable  | Enable the evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 101.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit the EVPN MPLS mode and return to the configure mode.  | 
(config)#interface xe6.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 10000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router ldp  | Enable LDP in the PE  | 
(config-router)#exit  | Exit router mode  | 
(config)#interface xe5  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 10.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable ldp  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 1  | Enter OSPF router mode  | 
(config-router)#ospf router-id 101.1.1.1  | Configure router-id.  | 
(config-router)#network 101.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 10.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config)#allocate-label all  |  Configure allocate all under router bgp   | 
(config-router)#neighbor 102.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 102.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 104.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 104.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 105.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 105.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 104.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 102.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 102.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 102.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 labeled-unicast address family  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 104.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#neighbor 105.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode.  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit the transaction.  | 
(config)#exit  | Exit the config mode.  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)#ip address 102.1.1.1/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
(config)#router ldp  | Enter the Router LDP mode.  | 
(config-router)#exit  | Exit router mode.  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#interface xe6  | Enter the Interface mode for xe3.  | 
(config-if)#ip address 10.1.1.2/24  | Configure IP address on the interface.  | 
(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
(config-if)#label-switching  | Enable label switching on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe1  | Enter the Interface mode for xe5  | 
(config-if)#ip address 20.1.1.1/31  | Configure IP address on the interface.  | 
(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
(config-if)#label-switching  | Enable label switching on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
(config)# enable ext-ospf-multi-inst  | Enable multiple-instance capability  | 
(config)#router ospf 1  | Enter the Router OSPF mode.  | 
(config-router)#ospf router-id 102.1.1.1  | Setting the Router ID as Loopback IP   | 
(config-router)#network 102.1.1.1/32 area 0.0.0.0 instance-id 2  | Advertise loopback address in OSPF.  | 
(config-router)#network 20.1.1.0/24 area 0.0.0.0  | Advertise network address in OSPF.  | 
(config)#router ospf 2  | Enter the Router OSPF mode.  | 
(config-router)#network 10.1.1.0/24 area 0.0.0.0 instance-id 1  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)#commit   | Commit candidate configuration to be running configuration  | 
(config)#router bgp 1  | Enter the Router BGP mode, ASN: 1  | 
(config)#allocate-label all  |  Configure allocate all under router bgp   | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 102.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 101.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 101.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 103.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 103.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)# exit-address-family  | Exit from ipv4 labeled-unicast address family  | 
(config-router)#exit  | Exit router mode.  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
#configure terminal  | Enter configuration mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 103.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config)#router ldp  | Configure ldp.  | 
(config)#interface xe4  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 30.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp  | Enable RSVP.  | 
(config)#interface xe1  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 20.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp  | Enable ldp  | 
(config)#interface xe7  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 40.1.1.1/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-rsvp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)# enable ext-ospf-multi-inst  | Enable multiple-instance capability  | 
(config)#router ospf 2  | Enter OSPF router mode  | 
(config-router)#ospf router-id 103.1.1.1  | Configure router-id.  | 
(config-router)#network 103.1.1.1/32 area 0.0.0.0 instance-id 3  | Advertise the loopback address in area 0.  | 
(config-router)#network 20.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config)#router ospf 3  | Enter the Router OSPF mode.  | 
(config-router)#network 30.1.1.0/24 area 0.0.0.0 instance-id 2  | Advertise the network address in area 0  | 
(config-router)#network 40.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#exit  | Exit the config mode  | 
(config)#router bgp 1  | Enter the Router BGP mode, ASN: 1  | 
(config)#allocate-label all  |  Configure allocate all under router bgp   | 
(config-router)#neighbor 102.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 102.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 104.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 104.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 105.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 105.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 103.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 102.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 102.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 102.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)#neighbor 104.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 104.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 104.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)#neighbor 105.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)#neighbor 105.1.1.1 next-hop-self  | Configure next-hop-self for the ipv4 labeled-unicast neighbor  | 
config-router-af)#neighbor 105.1.1.1 route-reflector-client  |  Configure neighbor as route reflector client  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 labeled-unicast address family  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
#configure terminal  | Enter configuration mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 104.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 104:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target import 101:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target export 104:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode  | 
(config)#evpn mpls enable  | Enable evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 104.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-evpn-mpls)#exit  | Exit the EVPN MPLS mode and return to the configure mode.  | 
(config)#router ldp  | Enable ldp in the PE  | 
(config)#interface xe5  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 30.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp ipv4  | Enable ldp  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 3  | Enter OSPF router mode  | 
(config-router)#ospf router-id 104.1.1.1  | Configure router-id.  | 
(config-router)#network 104.1.1.1/32 area 0.0.0.2  | Advertise the loopback address in area 0.  | 
(config-router)#network 30.1.1.0/24 area 0.0.0.2  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 104.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit-address-family  | Exit address family mode.  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#evpn multihoming enable  | Enable EVPN multi-homing  | 
(config)#int po1  | Enter interface mode  | 
(config-if)#evpn multi-homed system-mac 00:00:00:00:00:00:00:11:22  | Make the interface multi-homed and set an Ethernet Segment Identifier (ESI)  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#int xe6  | Enter interface mode  | 
(config-if)#channel-group 1 mode active  | Add member to the LAG interface  | 
(config-if)#exit  | Exit the interface mode.  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config-if)#int po1.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 1000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
#configure terminal  | Enter configuration mode.  | 
(config)#int lo  | Enter interface mode for loopback.  | 
(config-if)#ip address 105.1.1.1/32 secondary  | Configure IP address on loopback  | 
(config-if)#exit  | Exit interface mode  | 
(config)#mac vrf vrfred  | Configure MAC VRF  | 
(config-vrf)#rd 105:1  | Configure RD for the MAC VRF  | 
(config-vrf)#route-target import 101:1  | Configure import RT for the MAC VRF  | 
(config-vrf)#route-target export 105:1  | Configure export RT for the MAC VRF  | 
(config-vrf)#exit  | Exit VRF mode  | 
(config)#evpn mpls enable  | Enable evpn mpls.  | 
(config)#evpn mpls vtep-ip-global 105.1.1.1  | Configure VTEP-IP-global.  | 
(config)#evpn mpls id 1000  | Configure MPLS EVID.  | 
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred  | Configure host-reachability with VRF association.  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#router ldp  | Enable RSVP in the PE  | 
(config)#interface xe4  | Enter interface mode for the network side interface.  | 
(config-if)#ip address 40.1.1.2/24  | Configure IP address on the network interface  | 
(config-if)#label-switching  | Enable label-switching.  | 
(config-if)#enable-ldp  | Enable RSVP.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#router ospf 3  | Enter OSPF router mode  | 
(config-router)#ospf router-id 105.1.1.1  | Configure router-id.  | 
(config-router)#network 105.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in area 0.  | 
(config-router)#network 40.1.1.0/24 area 0.0.0.0  | Advertise the network address in area 0  | 
(config-router)#exit  | Exit OSPF router mode.  | 
(config)#router bgp 1  | Enter BGP router mode  | 
(config-router)#neighbor 101.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 101.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)#neighbor 103.1.1.1 remote-as 1  | Advertise the neighbor in BGP process with the remote-as number  | 
(config-router)#neighbor 103.1.1.1 update-source lo  | Configure the update-source for the neighbor  | 
(config-router)# address-family ipv4 unicast  | Entering into address family ipv4 unicast  | 
(config-router-af)# network 105.1.1.1/32  | Advertise the network  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)# address-family ipv4 labeled-unicast  | Entering into address family ipv4 labeled-unicast  | 
(config-router-af)#neighbor 103.1.1.1 activate  | Activate the ipv4 labeled-unicast neighbor  | 
(config-router-af)# exit-address-family  |  Exit from ipv4 address family  | 
(config-router)#address-family l2vpn evpn  | Enter EVPN address family mode  | 
(config-router-af)#neighbor 101.1.1.1 activate  | Activate the neighbor  | 
(config-router-af)#exit  | Exit the transaction  | 
(config-router)#exit  | Exit the router mode  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config)#evpn multihoming enable  | Enable EVPN multi-homing  | 
(config)#int po1  | Enter interface mode  | 
(config-if)#evpn multi-homed system-mac 00:00:00:00:00:00:00:11:22  | Make the interface multi-homed and set an Ethernet Segment Identifier (ESI)  | 
(config-if)#exit  | Exit interface mode.  | 
(config)#int xe3  | Enter interface mode  | 
(config-if)#channel-group 1 mode active  | Add member to the LAG interface  | 
(config-if)#exit  | Exit the interface mode.  | 
(config)#commit  | Commit candidate configuration to be running configuration  | 
(config-if)#int po1.2  | Configure sub-interface to create access-circuit.  | 
(config-if)#switchport  | Make the sub-interface a Layer 2 interface  | 
(config-if)#encapsulation dot1q 2  | Configure the encapsulation required.  | 
(config-if)#map vpn-id 10000  | Map interface to Ethernet virtual network identifier.  | 
(config-if)#commit  | Commit candidate configuration to be running configuration  |