
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)#ip address 21.21.21.21/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe2  | Enter the Interface mode for xe2.  | 
(config-if)# ip address 10.10.23.21/24  | Configure IP address on the interface.  | 
(config-if)#enable-rsvp  | Enable RSVP on the physical 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 21.21.21.21  | Router-id configurations   | 
(config-router)#network 21.21.21.21/32 area 0  | Advertise loopback address in OSPF.  | 
(config-router)#network 10.10.23.0/24 area 0  | Advertise network address in OSPF.  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)#router rsvp  | Enter the Router OSPF mode.  | 
(config-router)#exit  | Exit Router RSVP mode and return to Configure mode.  | 
(config)#rsvp-trunk 1  | Enter the Trunk configuration mode  | 
(config-trunk)#to 23.23.23.23  | Configure the destination of the Trunk  | 
(config-trunk)#exit  | Exit.Trunk configuration mode  | 
(config)# router bgp 100  | Enter the BGP configuration mode.  | 
(config-router)#neighbor 23.23.23.23  remote-as 100  | Configure neighbor  | 
(config-router)#neighbor 23.23.23.23  update-source 21.21.21.21  | Update loopback address as source  | 
(config-router)#address-family l2vpn vpls  | Enter address family mode.  | 
(config-router-af)#neighbor 23.23.23.23 activate  | Activate the neighbor.  | 
(config-router-af)#exit  | Exit address family mode.  | 
(config-router)#exit  | Exit Router BGP mode  | 
(config)#mpls vpls v1 25  | Enter VPLS config mode  | 
(config)#service-tpid dot1.ad  | Service tp-id configuration.  | 
(config-vpls)#signaling bgp  | Define Signaling as BGP  | 
(config-vpls-sig)#ve-id 1  | Configure VE-ID  | 
(config-vpls-sig)#exit  | Exit Signaling BGP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#mpls vpls v2 26  | Enter VPLS config mode  | 
(config)#service-tpid dot1.ad  | Service tp-id configuration.  | 
(config-vpls)#signaling bgp  | Define Signaling as BGP  | 
(config-vpls-sig)#ve-id 1  | Configure VE-ID  | 
(config-vpls-sig)#exit  | Exit Signaling BGP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#mpls vpls v3 27  | Enter VPLS config mode  | 
(config-vpls)#signaling bgp  | Define Signaling as BGP  | 
(config-vpls-sig)#ve-id 1  | Configure VE-ID  | 
(config-vpls-sig)#exit  | Exit Signaling BGP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#mpls vpls v4 28  | Enter VPLS config mode  | 
(config-vpls)#signaling bgp  | Define Signaling as BGP  | 
(config-vpls-sig)#ve-id 1  | Configure VE-ID  | 
(config-vpls-sig)#exit  | Exit Signaling BGP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#commit  | Commit candidate configuration to running configuration  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)#ip address 22.22.22.22/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe1  | Enter the Interface mode for xe1  | 
(config-if)#ip address 10.10.23.22/24  | Configure IP address on the interface.  | 
(config-if)#enable-rsvp  | Enable RSVP on the physical interface  | 
(config-if)#label-switching  | Enable label switching on the interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe2  | Enter the Interface mode for xe2  | 
(config-if)#ip address 10.10.21.22/24  | Configure IP address on the interface.  | 
(config-if)#enable-rsvp  | Enable RSVP on the physical 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)#network 22.22.22.22/32 area 0  | Advertise loopback address in OSPF.  | 
(config-router)#network 10.10.23.0/24 area 0  | Advertise network address in OSPF.  | 
(config-router)#network 10.10.21.0/24 area 0  | Advertise network address in OSPF.  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)#router rsvp  | Enter the Router OSPF mode.  | 
(config-router)#exit  | Exit Router RSVP mode and return to Configure mode.  | 
(config)#commit  | Commit candidate configuration to running configuration  | 
#configure terminal  | Enter configuration mode.  | 
(config)#interface lo  | Enter the Interface mode for the loopback interface.  | 
(config-if)#ip address 23.23.23.23/32 secondary  | Configure IP address on loopback interface.  | 
(config-if)#exit  | Exit interface mode  | 
(config)#interface xe1  | Enter the Interface mode for xe1  | 
(config-if)#ip address 10.10.21.23/24  | Configure IP address on the interface.  | 
(config-if)#enable-rsvp  | Enable RSVP on the physical 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)#network 23.23.23.23/32 area 0  | Advertise loopback address in OSPF.  | 
(config-router)#network 10.10.21.0/24 area 0  | Advertise network address in OSPF.  | 
(config-router)#exit  | Exit Router OSPF mode and return to Configure mode.  | 
(config)#router rsvp  | Enter the Router OSPF mode.  | 
(config-router)#exit  | Exit Router RSVP mode and return to Configure mode.  | 
(config)#rsvp-trunk 1  | Enter the Trunk configuration mode  | 
(config-trunk)#to 21.21.21.21  | Configure the destination of the Trunk  | 
(config-trunk)#exit  | Exit.Trunk configuration mode  | 
(config)# router bgp 100  | Enter the BGP configuration mode.  | 
(config-router)#neighbor 21.21.21.21  remote-as 100  | Configure neighbor  | 
(config-router)#neighbor 21.21.21.21  update-source 23.23.23.23  | Update loopback address as source  | 
(config-router)#address-family l2vpn vpls  | Enter address family mode.  | 
(config-router-af)#neighbor 21.21.21.21 activate  | Activate the neighbor.  | 
(config-router-af)#exit  | Exit address family mode.  | 
(config-router)#exit  | Exit Router BGP mode  | 
(config)#mpls vpls v1 25  | Enter VPLS config mode  | 
(config)#service-tpid dot1.ad  | Service tp-id configuration.  | 
(config-vpls)#signaling bgp  | Define Signaling as BGP  | 
(config-vpls-sig)#ve-id 2  | Configure VE-ID  | 
(config-vpls-sig)#exit  | Exit Signaling BGP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#mpls vpls v2 26  | Enter VPLS config mode  | 
(config)#service-tpid dot1.ad  | Service tp-id configuration.  | 
(config-vpls)#signaling bgp  | Define Signaling as BGP  | 
(config-vpls-sig)#ve-id 2  | Configure VE-ID  | 
(config-vpls-sig)#exit  | Exit Signaling BGP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#mpls vpls v3 27  | Enter VPLS config mode  | 
(config-vpls)#signaling bgp  | Define Signaling as BGP  | 
(config-vpls-sig)#ve-id 2  | Configure VE-ID  | 
(config-vpls-sig)#exit  | Exit Signaling BGP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#mpls vpls v4 28  | Enter VPLS config mode  | 
(config-vpls)#signaling bgp  | Define Signaling as BGP  | 
(config-vpls-sig)#ve-id 2  | Configure VE-ID  | 
(config-vpls-sig)#exit  | Exit Signaling BGP mode  | 
(config-vpls)#exit  | Exit VPLS mode  | 
(config)#commit  | Commit candidate configuration to running configuration  | 
(config)#configure terminal  | Configure mode  | 
(config)#service-template template1  | Template configuration  | 
(config-svc)# match double-tag outer-vlan 2024 inner-vlan 2023  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress pop outgoing-tpid dot1.q  | Action to be performed for the match.  | 
(config-svc)#exit  | Exit template configuration mode  | 
(config)#service-template template2  | Template configuration  | 
(config-svc)# match double-tag outer-vlan 2030 inner-vlan 2024  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress translate 2026 outgoing-tpid dot1.q  | Action to be performed for the match   | 
(config-svc)#exit  | Exit template configuration mode  | 
(config)#service-template template3  | Template configuration  | 
(config-svc)# match outer-vlan 500  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress push 300  | Action to be performed for the default match.  | 
(config-svc)#exit  | Exit template configuration mode  | 
(config)#service-template template4  | Template configuration  | 
(config-svc)# match outer-vlan 700  | Allow VLAN 700 traffic on this VC  | 
(config-svc)# match double-tag outer-vlan 1200 inner-vlan 3200  | Allow double tag match with s+c tags  | 
(config-svc)# match untagged  | Allow untagged traffic  | 
(config-svc)# rewrite ingress push 300  | Push Action performed for service template  | 
(config-svc)#exit  | Exit configure SVC mode  | 
(config)#interface xe1  | Enter the Interface mode for xe1.  | 
(config-if)switchport  | Configure interface as L2 interface  | 
(config-if)#mpls-vpls v1 service-template template1  | Bind the VPLS to the Access Interface.  | 
(config-if-vpls)no ac-admin-status  | Making Ac-admin-status Up  | 
(config-if-vpls)#exit  | Exit VPLS attachment-circuit mode  | 
(config-if)#mpls-vpls v2 service-template template2  | Bind the VPLS to the Access Interface.  | 
(config-if-vpls)no ac-admin-status  | Making Ac-admin-status Up  | 
(config-if-vpls)#exit  | Exit VPLS attachment-circuit mode  | 
(config-if)#mpls-vpls v3 service-template template3  | Bind the VPLS to the Access Interface.  | 
(config-if-vpls)#no ac-admin-statusv  | Making Ac-admin-status Up  | 
(config-if-vpls)#exit  | Exit VPLS attachment-circuit mode  | 
(config-if)#mpls-vpls v4 service-template template4  | Bind the VPLS to the Access Interface.  | 
(config-if-vpls)#split-horizon group access1  | Configure split-horizon group on VPLS  | 
(config-if-vpls)#no ac-admin-status  | Making Ac-admin-status Up  | 
(config-if-vpls)#exit  | Exit VPLS attachment-circuit mode  | 
(config-if)#exit  | Exit Interface mode and return to Configure mode.  | 
(config)#commit  | Commit candidate configuration to running configuration  | 
(config)#configure terminal  | Configure mode  | 
(config)#service-template template1  | Template configuration  | 
(config-svc)# match double-tag outer-vlan 2024 inner-vlan 2023  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress pop outgoing-tpid dot1.ad  | Action to be performed for the match.  | 
(config-svc)#exit  | Exit template configuration mode  | 
(config)#service-template template2  | Template configuration  | 
(config-svc)# match double-tag outer-vlan 2030 inner-vlan 2024  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress translate 2026 outgoing-tpid dot1.q  | Action to be performed for the match   | 
(config-svc)#exit  | Exit template configuration mode  | 
(config)#service-template template3  | Template configuration  | 
(config-svc)# match outer-vlan 500  | Match criteria under template configuration  | 
(config-svc)# rewrite ingress push 300  | Action to be performed for the default match.  | 
(config-svc)#exit  | Exit template configuration mode  | 
(config)#service-template template4  | Template configuration  | 
(config-svc)# match outer-vlan 700  | Allow VLAN 700 traffic on this VC  | 
(config-svc)# match double-tag outer-vlan 1200 inner-vlan 3200  | Allow double tag match with s+c tags  | 
(config-svc)# match untagged  | Allow untagged traffic  | 
(config-svc)# rewrite ingress push 300  | Push Action performed for service template  | 
(config-svc)#exit  | Exit configure SVC mode  | 
(config)#interface eth2  | Enter the Interface mode for ethernet1.  | 
(config-if)switchport  | Configure interface as L2 interface  | 
(config-if)#mpls-vpls v1 service-template template1  | Bind the VPLS to the Access Interface.  | 
(config-if-vpls)#no ac-admin-status  | Making admin status up  | 
(config-if-vpls)#exit  | Exit VPLS attachment-circuit mode  | 
(config-if)#mpls-vpls v2 service-template template2  | Bind the VPLS to the Access Interface.  | 
(config-if-vpls)#no ac-admin-status  | Making admin status up  | 
(config-if-vpls)#exit  | Exit VPLS attachment-circuit mode  | 
(config-if)#mpls-vpls v3 service-template template3  | Bind the VPLS to the Access Interface.  | 
(config-if-vpls)#no ac-admin-status  | Making admin status up  | 
(config-if-vpls)#exit  | Exit VPLS attachment-circuit mode  | 
(config-if)#mpls-vpls v4 service-template template4  | Bind the VPLS to the Access Interface.  | 
(config-if-vpls)#split-horizon group access1  | Configure split-horizon group on VPLS  | 
(config-if-vpls)#no ac-admin-status   | Making Ac-admin-status Up  | 
(config-if-vpls)#exit  | Exit VPLS attachment-circuit mode  | 
(config-if)#exit  | Exit Interface mode and return to Configure mode.  | 
(config)#commit  | Commit candidate configuration to running configuration  |