

SW1#configure terminal  | Enter configure mode.  | 
SW1(config)#bridge 1 protocol rstp vlan-bridge  | Create bridge 1 as an RSTP VLAN-aware bridge.  | 
SW1(config)#vlan database  | Entering vlan database  | 
SW1(config-vlan)#vlan 512 bridge 1 state enable  | Create VLAN 512 on bridge 1.  | 
SW1(config-vlan)#exit  | Exit vlan database  | 
SW1(config)#interface ce49  | Configure interface ce49.  | 
SW1(config-if)#switchport  | Configure the interface as switch port.  | 
SW1(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW1(config-if)#switchport mode trunk   | Configure interface mode as trunk.  | 
SW1(config-if)#switchport trunk allowed vlan all   | Allow all VLANs on interface ce49.  | 
SW1(config-if)#exit  | Exit config mode.  | 
SW1(config)#ethernet cfm domain-type character-string domain-name mdnam level 7 mip-creation default   | Create cfm domain with type as character string and set mip creation criteria to default.  | 
SW1(config-ether-cfm)#service ma-type string ma-name testtm   | Create ma type as string and configure the ma   | 
SW1(config-ether-cfm-ma)#vlan 25 bridge 1  | Configure vlan-id to associate the vlan to the MA   | 
SW1(config-ether-cfm-ma)#mip-creation default  | Set the mip creation criteria to default for the MA  | 
SW1(config-ether-cfm-ma)#ethernet cfm mep down mpid 2 active true ce49   | Create down mep on ce49.  | 
SW1(config-ether-cfm-ma-mep)#cc multicast state enable   | Enable cc multicast.  | 
SW1(config-ether-cfm-ma-mep)#exit-ether-ma-mep-mode   | Exit CFM MEP configuration mode.  | 
SW1(config-ether-cfm-ma)#mep crosscheck mpid 1  | Configure crosscheck to remote MEP in VLAN 512.  | 
SW1(config-ether-cfm-ma)#cc interval 10ms  | Enable cc interval for 10 millisecond.  | 
SW1(config-ether-cfm-ma)#exit-ether-ma-mode  | Exit CFM MA configuration mode.  | 
SW1(config-ether-cfm)#exit  | Exit ethernet CFM mode.  | 
SW1(config)#commit  | Commit the configuration  | 
SW1(config)#exit  | Exit the configure terminal mode  | 
SW2#configure terminal  | Enter configure mode.  | 
SW2(config)#bridge 1 protocol rstp vlan-bridge  | Create bridge 1 as an RSTP VLAN-aware bridge.  | 
SW2(config)#vlan database  | Entering vlan database  | 
SW2(config-vlan)#vlan 512 bridge 1 state enable  | Create VLAN 512 on bridge 1.  | 
SW2(config-vlan)#exit  | Exit vlan database  | 
SW2(config)#interface ce0  | Configure interface ce0.  | 
SW2(config-if)#switchport  | Configure the interface as switch port.  | 
SW2(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW2(config-if)#switchport mode trunk   | Configure interface mode as trunk.  | 
SW2(config-if)#switchport trunk allowed vlan all   | Allow all VLANs on interface ce0.  | 
SW2(config-if)#exit  | Exit config mode.  | 
SW2(config)#interface xe0  | Configure interface xe0.  | 
SW2(config-if)#switchport  | Configure the interface as switch port.  | 
SW2(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW2(config-if)#switchport mode trunk   | Configure interface mode as trunk.  | 
SW2(config-if)#switchport trunk allowed vlan all   | Allow all VLANs on interface xe1.  | 
SW2(config-if)#exit  | Exit the interface mode  | 
SW2(config)#commit  | Commit the configuration  | 
SW2(config)#exit  | Exit the configure terminal mode  | 
SW3#configure terminal  | Enter configure mode.  | 
SW3(config)#bridge 1 protocol rstp vlan-bridge  | Create bridge 1 as an RSTP VLAN-aware bridge.  | 
SW3(config)#vlan database  | Entering vlan database  | 
SW3(config-vlan)#vlan 512 bridge 1 state enable  | Create VLAN 512 on bridge 1.  | 
SW3(config-vlan)#exit  | Exit vlan database  | 
SW3(config)#interface xe17  | Configure interface xe17  | 
SW3(config-if)#switchport  | Configure the interface as switch port.  | 
SW3(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW3(config-if)#switchport mode trunk   | Configure interface mode as trunk.  | 
SW3(config-if)#switchport trunk allowed vlan all   | Allow all VLANs on interface xe17.  | 
SW3(config-if)#exit  | Exit config mode.  | 
SW3(config)#interface xe1  | Configure interface xe1.  | 
SW3(config-if)#switchport  | Configure the interface as switch port.  | 
SW3(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW3(config-if)#switchport mode trunk   | Configure interface mode as trunk.  | 
SW3(config-if)#switchport trunk allowed vlan all   | Allow all VLANs on interface xe1.  | 
SW3(config-if)#exit  | Exit the interface mode  | 
SW3(config)#commit  | Commit the configuration  | 
SW3(config)#exit  | Exit the configure terminal mode  | 
SW4#configure terminal  | Enter configure mode.  | 
SW4(config)#bridge 1 protocol rstp vlan-bridge  | Create bridge 1 as an RSTP VLAN-aware bridge.  | 
SW4(config)#vlan database  | Entering vlan database  | 
SW4(config-vlan)#vlan 512 bridge 1 state enable  | Create VLAN 512 on bridge 1.  | 
SW4(config-vlan)#exit  | Exit vlan database  | 
SW4(config)#interface xe1  | Configure interface xe1.  | 
SW4(config-if)#switchport  | Configure the interface as switch port.  | 
SW4(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW4(config-if)#switchport mode trunk   | Configure interface mode as trunk.  | 
SW4(config-if)#switchport trunk allowed vlan all   | Allow all VLANs on interface xe1.  | 
SW4(config-if)#exit  | Exit config mode.  | 
SW4(config)#interface xe9  | Configure interface xe9.  | 
SW4(config-if)#switchport  | Configure the interface as switch port.  | 
SW4(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW4(config-if)#switchport mode trunk   | Configure interface mode as trunk.  | 
SW4(config-if)#switchport trunk allowed vlan all   | Allow all VLANs on interface xe9.  | 
SW4(config-if)#exit  | Exit the interface mode  | 
SW4(config)#commit  | Commit the configuration  | 
SW4(config)#exit  | Exit the configure terminal mode  | 
SW5#configure terminal  | Enter configure mode.  | 
SW5(config)#bridge 1 protocol rstp vlan-bridge  | Create bridge 1 as an RSTP VLAN-aware bridge.  | 
SW5(config)#vlan database  | Entering vlan database  | 
SW5(config-vlan)#vlan 512 bridge 1 state enable  | Create VLAN 512 on bridge 1.  | 
SW5(config-vlan)#exit  | Exit vlan database  | 
SW5(config)#interface xe9  | Configure interface xe9.  | 
SW5(config-if)#switchport  | Configure the interface as switch port.  | 
SW5(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW5(config-if)#switchport mode trunk   | Configure interface mode as trunk.  | 
SW5(config-if)#switchport trunk allowed vlan all   | Allow all VLANs on interface xe9.  | 
SW5(config-if)#exit  | Exit config mode.  | 
SW5(config)#ethernet cfm domain-type character-string domain-name mdnam level 7 mip-creation default   | Create cfm domain with type as character string and set mip creation criteria to default.  | 
SW5(config-ether-cfm)#service ma-type string ma-name testtm   | Create ma type as string and set mip creation criteria to default.  | 
SW5(config-ether-cfm-ma)#vlan 25 bridge 1  | Configure vlan-id to associate the vlan to the MA   | 
SW5(config-ether-cfm-ma)#mip-creation default  | Set the mip creation criteria to default for the MA  | 
SW5(config-ether-cfm-ma)#ethernet cfm mep down mpid 1 active true xe9  | Create down mep on xe9.  | 
SW5(config-ether-cfm-ma-mep)#cc multicast state enable  | Enable cc multicast.  | 
SW5(config-ether-cfm-ma-mep)#exit-ether-ma- mep-mode  | Exit CFM MEP configuration mode  | 
SW5(config-ether-cfm-ma)#mep crosscheck mpid 2  | Configure crosscheck to remote MEP in VLAN 512.  | 
SW5(config-ether-cfm-ma)#cc interval 10ms  | Enable cc interval for 10 millisecond.  | 
SW5(config-ether-cfm-ma)#exit-ether-ma-mode  | Exit CFM MA configuration mode.  | 
SW5(config-ether-cfm)#exit  | Exit ethernet CFM mode.  | 
SW5(config)#commit  | Commit the configuration  | 
SW5(config)#exit  | Exit the configure terminal mode  | 
SW1#configure terminal  | Enter configure mode.  | 
SW1(config)#bridge 1 protocol rstp vlan- bridge  | Create bridge 1 as an RSTP VLAN-aware bridge.  | 
SW1(config)#vlan database  | Entering VLAN database.  | 
SW1(config-vlan)#vlan 512 bridge 1 state enable  | Create VLAN 512 on bridge 1.  | 
SW1(config-vlan)#exit  | Exit config mode.  | 
SW1(config)#interface ce49  | Configure interface ce49.  | 
SW1(config-if)#switchport  | Configure the interface as switch port.  | 
SW1(config-if)#bridge-group 1  | Configure interface in bridge group 1.  | 
SW1(config-if)#switchport mode trunk  | Configure interface mode as trunk.  | 
SW1(config-if)#switchport trunk allowed vlan all  | Allow all VLANs on interface ce49.  | 
SW1(config-if)#exit  | Exit interface mode.  | 
SW1(config)#commit  | Commit the configuration  | 
SW1(config)#exit  | Exit the configure terminal mode  | 
SW2#configure terminal  | Enter configure mode.  | 
SW2(config)#interface ce0  | Configure interface ce0.  | 
SW2(config-if)#switchport  | Configure interface as a switch port.  | 
SW2(config-if)#exit  | Exit interface mode.  | 
SW2(config)#interface xe0  | Configure interface xe0.  | 
SW2(config-if)#no switchport  | Configure interface as router port.  | 
SW2(config-if)#ip address 10.0.0.1/24  | Assign IP address to router port xe0  | 
SW2(config-if)#no shutdown  | Making the interface up  | 
SW2(config-if)#exit  | Exit interface mode.  | 
SW2(config)#interface lo  | Configure interface lo  | 
SW2(config-if)#ip address 1.1.1.1/32 secondary  | Configure secondary IP address to loopback interface .  | 
SW2(config-if)#exit  | Exit interface mode.  | 
SW2(config)#router ospf 100  | Configure ospf   | 
SW2(config-router)#network 10.0.0.0/24 area 0  | Advertising 10 network  | 
SW2(config-router)#network 1.1.1.1/32 area 0  | Advertising loopback IP  | 
SW2(config-router)#exit  | Exit router mode.  | 
SW2(config)#router rsvp  | Configuring rsvp  | 
SW2(config-router)#hello-receipt  | Configuring hello reception  | 
SW2(config-router)#no php  | Configuring device as not a PHP  | 
SW2(config-router)#revert-timer 10  | Configuring reversion time of RSVP  | 
SW2(config-router)#exit  | Exit router mode.  | 
SW2(config)#rsvp-trunk to-1 ipv4  | Configuring RSVP path  | 
SW2(config-trunk)#to 2.2.2.2  | Configuring first hop  | 
SW2(config-trunk)#to 3.3.3.3  | Configuring second hop  | 
SW2(config-trunk)#exit  | Exit trunk mode.  | 
SW2(config)#interface xe0  | Configuring interface   | 
SW2(config-if)#enable-rsvp  | Enabling RSVP in interface  | 
SW2(config-if)#label-switching  | Enabling MPLS labeling  | 
SW2(config-if)#enable-ldp ipv4  | Enabling ldp on interface  | 
SW2(config-if)#exit  | Exit interface mode.  | 
SW2(config)#router ldp  | Configuring LDP  | 
SW2(config-router)#targeted-peer ipv4 3.3.3.3  | Configuring LDP target peer for PW  | 
SW2(config-router-targeted-peer)#exit-targeted-peer-mode  | Exit target peer mode  | 
SW2(config-router)#no multicast-hellos  | Disabling LDP multicast  | 
SW2(config-router)#exit  | Exit router mode.  | 
SW2(config)#mpls l2-circuit ETH-2001 1 3.3.3.3  | Creating VPWS PW  | 
(config-pseudowire)#exit  | Exit pseudowire config mode.  | 
SW2(config)#service-template ETH-2001  | Configuring service template profile for PW  | 
SW2(config-svc)#match outer-vlan 200  | Configuring match condition  | 
SW2(config-svc)# rewrite ingress push 2000  | Configuring action for match  | 
SW2(config-svc)#exit  | Exit service template mode  | 
SW2(config)#interface ce0  | Configuring interface   | 
SW2(config-if)#mpls-l2-circuit ETH-2001 service-template ETH-2001  | Mapping VPWS in AC  | 
SW2(config-if)#exit  | Exit interface mode.  | 
SW2(config)#hardware-profile filter cfm-domain-name-str enable  | Enabling HW filter for character string domain name  | 
SW2(config)#ethernet cfm domain-type character-string domain-name 12345 level 7 mip-creation none   | Configuring CFM domain over VPWS  | 
SW2(config-ether-cfm-mpls-md)#service ma-type string ma-name 43981 mip-creation none  | Creating MA for domain  | 
SW2(config-ether-cfm-mpls-md-ma)#cc interval 100ms  | Configuring CFM interval  | 
SW2(config-ether-cfm-mpls-md-ma)#mep crosscheck mpid 1  | Configuring remote mep  | 
SW2(config-ether-cfm-mpls-md-ma)#ethernet cfm mep up mpid 4001 active true vpws ETH-2001  | Configuring local mep and mapping the same with vpws ser-vice  | 
SW2(config-ether-cfm-mpls-ma-mep)#cc multicast state enable  | Enabling the CFM multicast  | 
SW2(config-ether-cfm-mpls-ma-mep)#exit-ether-ma-mep-mode  | Exit CFM MEP configuration mode  | 
SW2(config-ether-cfm-mpls-md-ma)# exit-ether-ma-mode  | Exit Ethernet CFM MD configuration mode  | 
SW2(config-ether-cfm-mpls-md)# exit  | Configuring LM profile  | 
SW2(config)#ethernet cfm loss-measurement profile-name lmm  | Configuring LM profile  | 
SW2(config-cfm-lm)#measurement-type lmm  | Configuring measurement type as LMM  | 
SW2(config-cfm-lm)#message-period 3  | Configuring message period  | 
SW2(config-cfm-lm)#measurement-interval 1  | Configuring measurement interval  | 
SW2(config-cfm-lm)#intervals-stored 3  | Configuring number of interval to be stored  | 
SW2(config-cfm-lm)#exit  | Exit cfm loss measurement mode  | 
SW2(config)#commit  | Commit the configuration  | 
SW2(config)#exit  | Exit the configure terminal mode  | 
SW3#configure terminal  | Enter configure mode.  | 
SW3(config)#interface xe1  | Configure interface   | 
SW3(config-if)#no switchport  | Configure interface as router port.  | 
SW3(config-if)#ip address 20.0.0.1/24  | Assign IP address to router port  | 
SW3(config-if)#no shutdown  | Making the interface up  | 
SW3(config-if)#exit  | Exit interface mode.  | 
SW3(config)#interface xe17  | Configure interface   | 
SW3(config-if)#no switchport  | Configure interface as router port.  | 
SW3(config-if)#ip address 10.0.0.2/24  | Assign IP address to router port  | 
SW3(config-if)#no shutdown  | Making the interface up  | 
SW3(config-if)#exit  | Exit interface mode.  | 
SW3(config)#interface lo  | Configure interface lo  | 
SW3(config-if)#ip address 2.2.2.2/32 secondary  | Configure secondary IP address to loopback interface .  | 
SW3(config-if)#exit  | Exit interface mode.  | 
SW3(config)#router ospf 100  | Configure ospf   | 
SW3(config-router)#network 10.0.0.0/24 area 0  | Advertising 10 network  | 
SW3(config-router)#network 20.0.0.0/24 area 0  | Advertising 10 network  | 
SW3(config-router)#network 2.2.2.2/32 area 0  | Advertising loopback IP  | 
SW3(config-router)#exit  | Exit router mode.  | 
SW3(config)#router rsvp  | Configuring rsvp  | 
SW3(config-router)#hello-receipt  | Configuring hello reception  | 
SW3(config-router)#no php  | Configuring device as not a PHP  | 
SW3(config-router)#revert-timer 10  | Configuring reversion time of RSVP  | 
SW3(config-router)#exit  | Exit router mode.  | 
SW3(config)#interface xe1  | Configuring interface   | 
SW3(config-if)#enable-rsvp  | Enabling RSVP in interface  | 
SW3(config-if)#label-switching  | Enabling MPLS labeling  | 
SW3(config-if)#enable-ldp ipv4  | Enabling ldp on interface  | 
SW3(config-if)#exit  | Exit interface mode.  | 
SW3(config)#interface xe17  | Configuring interface   | 
SW3(config-if)#enable-rsvp  | Enabling RSVP in interface  | 
SW3(config-if)#label-switching  | Enabling MPLS labeling  | 
SW3(config-if)#enable-ldp ipv4  | Enabling ldp on interface  | 
SW3(config-if)#exit  | Exit interface mode.  | 
SW3(config)#commit  | Commit the configuration  | 
SW3(config)#exit  | Exit configure terminal mode  | 
SW4#configure terminal  | Enter configure mode.  | 
SW4(config)#interface xe9  | Configure interface   | 
SW4(config-if)#switchport  | Configure interface as switch port.  | 
SW4(config-if)#exit  | Exit interface mode.  | 
SW4(config)#interface xe1  | Configure interface   | 
SW4(config-if)#no switchport  | Configure interface as router port.  | 
SW4(config-if)#ip address 20.0.0.2/24  | Assign IP address to router port  | 
SW4(config-if)#no shutdown  | Making the interface up  | 
SW4(config-if)#exit  | Exit interface mode.  | 
SW4(config)#interface lo  | Configure interface lo  | 
SW4(config-if)#ip address 3.3.3.3/32 secondary  | Configure secondary IP address to loopback interface .  | 
SW4(config-if)#exit  | Exit interface mode.  | 
SW4(config)#router ospf 100  | Configure ospf   | 
SW4(config-router)#network 20.0.0.0/24 area 0  | Advertising 10 network  | 
SW4(config-router)#network 3.3.3.3/32 area 0  | Advertising loopback IP  | 
SW4(config-router)#exit  | Exit router mode.  | 
SW4(config)#router rsvp  | Configuring rsvp  | 
SW4(config-router)#hello-receipt  | Configuring hello reception  | 
SW4(config-router)#no php  | Configuring device as not a PHP  | 
SW4(config-router)#revert-timer 10  | Configuring reversion time of RSVP  | 
SW4(config-router)#exit  | Exit router mode.  | 
SW4(config)#rsvp-trunk to-1 ipv4  | Configuring RSVP path  | 
SW4(config-trunk)#to 2.2.2.2  | Configuring first hop  | 
SW4(config-trunk)#to 1.1.1.1  | Configuring second hop  | 
SW4(config-trunk)#exit  | Exit trunk mode.  | 
SW4(config)#interface xe1  | Configuring interface   | 
SW4(config-if)#enable-rsvp  | Enabling RSVP in interface  | 
SW4(config-if)#label-switching  | Enabling MPLS labeling  | 
SW4(config-if)#enable-ldp ipv4  | Enabling ldp on interface  | 
SW4(config-if)#exit  | Exit interface mode.  | 
SW4(config)#router ldp  | Configuring LDP  | 
SW4(config-router)#targeted-peer ipv4 1.1.1.1  | Configuring LDP target peer for PW  | 
SW4(config-router-targeted-peer)#exit-targeted-peer-mode  | Exit target peer mode  | 
SW4(config-router)#no multicast-hellos  | Disabling LDP multicast  | 
SW4(config-router)#exit  | Exit router mode.  | 
SW4(config)#mpls l2-circuit ETH-2001 1 1.1.1.1  | Creating VPWS PW  | 
(config-pseudowire)#exit  | Exit pseudowire config mode.  | 
SW4(config)#service-template ETH-2001  | Configuring service template profile for PW  | 
SW4(config-svc)# match outer-vlan 200  | Configuring match condition  | 
SW4(config-svc)# rewrite ingress push 2000  | Configuring action for match  | 
SW4(config-svc)#exit  | Exit service template mode  | 
SW4(config)#interface xe9  | Configuring interface   | 
SW4(config-if)#mpls-l2-circuit ETH-2001 service-template ETH-2001  | Mapping VPWS in AC  | 
SW4(config-if)#exit  | Exit interface mode.  | 
SW4(config)#hardware-profile filter cfm-domain-name-str enable  | Enabling HW filter for character string domain name  | 
SW4(config)#ethernet cfm domain-type character-string domain-name 12345 level 7 mip-creation none  | Configuring CFM domain over VPWS  | 
SW4(config-ether-cfm-mpls-md)#service ma-type string ma-name 43981 mip-creation none  | Creating MA for domain  | 
SW4(config-ether-cfm-mpls-md-ma)#cc interval 100ms  | Configuring CFM interval  | 
SW4(config-ether-cfm-mpls-md-ma)#mep crosscheck mpid 4001  | Configuring remote mep  | 
SW4(config-ether-cfm-mpls-md-ma)#ethernet cfm mep up mpid 1 active true vpws ETH-2001  | Configuring local mep and mapping the same with vpws ser-vice  | 
SW4(config-ether-cfm-mpls-ma-mep)#cc multicast state enable  | Enabling the CFM multicast  | 
SW4(config-ether-cfm-mpls-ma-mep)#ethernet cfm loss-measurement reply lmm  | Configuring LMR  | 
SW4(config-ether-cfm-mpls-ma-mep)#exit-ether-ma-mep-mode  | Exit CFM MEP configuration mode  | 
SW4(config-ether-cfm-mpls-md-ma)#exit-ether-ma-mode  | Exit CFM MA configuration mode  | 
SW4(config-ether-cfm-mpls-md)#exit  | Exit Ethernet CFM MD configuration mode  | 
SW4(config)#commit  | Commit the configuration  | 
SW4(config)#exit  | Exit configure terminal mode  | 
SW5#configure terminal  | Enter configure mode.  | 
SW5(config)#bridge 1 protocol rstp vlan- bridge  | Create bridge 1 as an RSTP VLAN-aware bridge.  | 
SW5(config)#vlan database  | Entering VLAN database.  | 
SW5(config-vlan)#vlan 512 bridge 1 state enable  | Create VLAN 512 on bridge 1.  | 
SW5(config-vlan)#exit  | Exit config mode.  | 
SW5(config)#interface xe9  | Configure interface ce49.  | 
SW5(config-if)#switchport  | Configure the interface as switch port.  | 
SW5(config-if)#bridge-group 1  | Configure interface in bridge group 1  | 
SW5(config-if)#switchport mode trunk  | Configure interface mode as trunk.  | 
SW5(config-if)#switchport trunk allowed vlan all  | Allow all VLANs on interface ce49.  | 
SW5(config-if)#exit  | Exit interface mode.  | 
SW5(config)#commit  | Commit the configuration  | 
SW5(config)#exit  | Exit configure terminal mode  | 

PE1(#configure terminal  | Enter the configure mode  | 
PE1(config)#interface lo  | Enter the Interface mode for the loopback interface  | 
PE1(config-if)#ip address 1.1.1.1/32 secondary  | Configure IP address on loop-back interface  | 
PE1(config-if)#exit  | Exit the interface mode  | 
PE1(config-if)#commit  | Commit the transaction  | 
PE1(config)#router ldp  | Enter the Router LDP mode  | 
PE1(config-router)#router-id 1.1.1.1  | Set the router ID to IP address 1.1.1.1  | 
PE1(config-router)#targeted-peer ipv4 7.7.7.7  | Configure targeted peer  | 
PE1(config-router)#targeted-peer ipv4 8.8.8.8  | Configure targeted peer  | 
PE1(config-router-targeted-peer)#exit  | Exit targeted-peer-mode  | 
PE1(config-router)#exit  | Exit from router target peer and LDP mode  | 
PE1(config-router)#commit  | Commit the transaction  | 
PE1(config)#evpn mpls enable  | Enable EVPN MPLS  | 
PE1(config)#commit  | Commit candidate configuration to be running configuration  | 
PE1(config)#evpn mpls vtep-ip-global 1.1.1.1  | Configure VTEP global IP to loopback IP  | 
PE1(config)#interface xe33  | Enter the Interface mode for xe33  | 
PE1(config-if)#ip address 10.1.0.1/16  | Configure IP address on the interface  | 
PE1(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
PE1(config-if)#label-switching  | Enable label switching on the interface  | 
PE1(config-if)#exit  | Exit interface mode  | 
PE1(config-if)#commit  | Commit the transaction  | 
PE1(config)#router ospf 1  | Enter the Router OSPF mode  | 
PE1(config-router)#ospf router-id 1.1.1.1  | Router-ID configurations  | 
PE1(config-router)#network 1.1.1.1/32 area 0.0.0.0  | Advertise the loopback address in the OSPF  | 
PE1(config-router)#network 10.1.0.0/16  area 0.0.0.0  | Advertise the network address in the OSPF  | 
PE1(config-router)#exit  | Exit router OSPF mode and return to Configure mode  | 
PE1(config)#commit  | Commit the transaction  | 
PE1(config)#router bgp 1  | Enter the Router BGP mode, ASN: 1  | 
PE1(config-router)#neighbor 7.7.7.7 remote- as 1  | Configure neighbor as iBGP neighbor  | 
PE1(config-router)#neighbor 7.7.7.7 update- source lo  | Source of routing updates as loop-back  | 
PE1(config-router)#neighbor 8.8.8.8 remote- as 1  | Configure Neighbor as iBGP neighbor  | 
PE1(config-router)#neighbor 8.8.8.8 update- source lo  | Source of routing updates as loop-back  | 
PE1(config-router)#address-family l2vpn evpn  | Enter into address family mode as EVPN  | 
PE1(config-router-af)#neighbor 7.7.7.7 activate  | Enable the EVPN Address family for neighbor  | 
PE1(config-router-af)#neighbor 8.8.8.8 activate  | Enable the EVPN Address family for neighbor  | 
PE1(config-router-af)#exit  | Exit  the Address family mode  | 
PE1(config-router)#exit  | Exit the router Address  | 
PE1(config)#commit  | Commit the transaction  | 
PE1(config-router)#commit  | Commit the transaction  | 
PE1(config)#mac vrf vrf2  | Enter VRF mode  | 
PE1(config-vrf)#rd 1.1.1.1:2  | Configure route-distinguisher value 1.1.1.1:2  | 
PE1(config-vrf)#route-target both 2:2  | Configure import and export value as 2:2  | 
PE1(config-vrf)#exit  | Exit VRF Mode  | 
PE1(config-router)#commit  | Commit the transaction  | 
PE1(config)#evpn mpls id 52 xconnect target- mpls-id 2  | Configure the EVPN-VPWS identifier with source identifier 2 and target identifier 2  | 
PE1(config-evpn-mpls)#host-reachability- protocol evpn-bgp vrf2  | Map VRF "VRF2" to EVPN-VPWS identifier  | 
PE1(config)#interface xe33  | Enter the Interface mode for xe33  | 
PE1(config-if)#interface xe33.2 switchport  | Create L2 sub interface of physical interface xe33  | 
PE1(config-if)#description access-side-int  | Provide the interface description  | 
PE1(config-if)#encapsulation dot1q 2  | Set encapsulation to dot1q with VLAN ID 2  | 
PE1(config-if)#access-if-evpn  | Enter the access mode for EVPN MPLS ID configuration  | 
PE1(config-access-if)#map vpn-id 52  | Map VPN-id 52 to interface xe33.2 (VPWS)  | 
PE1(config-access-if)#exit  | Exit out of access interface mode  | 
PE1(config)#exit  | Commit the transaction  | 
P(#configure terminal  | Enter configure mode  | 
P(config)#interface lo  | Enter the Interface mode for the loop-back interface  | 
P(config-if)#ip address 2.2.2.2/32 secondary  | Configure IP address on loop-back interface  | 
P(config-if)#exit  | Exit interface mode  | 
P(config)#commit  | Commit the transaction  | 
P(config)#router ldp  | Enter the Router LDP mode  | 
P(config-router)#router-id 2.2.2.2  | Set the router ID to IP address 2.2.2.2  | 
P(config-router)#exit  | Exit from router target peer and LDP mode  | 
P(config-router)#commit  | Commit the transaction  | 
P(config)#interface xe6  | Enter the Interface mode for xe6  | 
P(config-if)#ip address 10.1.0.2/16  | Configure IP address on the interface  | 
P(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
P(config-if)#label-switching  | Enable label switching on the interface  | 
P(config-if)#exit  | Exit interface mode  | 
P(config)#interface xe21  | Enter the Interface mode for xe21  | 
P(config-if)#ip address 123.1.1.1/24  | Configure IP address on the interface  | 
P(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
P(config-if)#label-switching  | Enable label switching on the interface  | 
P(config-if)#exit  | Exit interface mode  | 
P(config)#interface xe20  | Enter the Interface mode for xe20  | 
P(config-if)#ip address 124.1.1.1/24  | Configure IP address on the interface  | 
P(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
P(config-if)#label-switching  | Enable label switching on the interface  | 
P(config-if)#exit  | Exit the interface mode  | 
P(config)#commit  | Commit the transaction  | 
P(config)#router ospf 1  | Enter the router OSPF mode  | 
P(config-router)#ospf router-id 2.2.2.2  | Set the router ID as loop-back IP  | 
P(config-router)#network 2.2.2.2/32 area 0  | Advertise loop-back address in OSPF  | 
P(config-router)#network 10.1.0.0/16 area 0.0.0.0  | Advertise xe3 network address in the OSPF that comes under same subnet  | 
P(config-router)#network 123.1.1.0/24  area 0.0.0.0  | Advertise the network address in the OSPF that comes under same subnet  | 
P(config-router)#network 124.1.1.0/24  area 0.0.0.0  | Advertise the network address in the OSPF that comes under same subnet  | 
P(config-router)#exit  | Exit the router OSPF mode and return to configure mode  | 
POcNOS(config)#commit  | Commit the candidate configuration to the running configuration  | 
PE2#configure terminal  | Enter the configure mode  | 
PE2(config)#interface lo  | Enter the Interface mode for the loopback interface  | 
PE2(config-if)#ip address 7.7.7.7/32 secondary  | Configure IP address on loopback interface.  | 
PE2(config-if)#exit  | Exit interface mode  | 
PE2(config)#commit  | Commit the transaction  | 
PE2(config)#router ldp  | Enter the router LDP mode  | 
PE2(config-router)#router-id 7.7.7.7  | Set the router ID to IP address 7.7.7.7  | 
PE2(config-router)#targeted-peer ipv4 1.1.1.1  | Configure the targeted peer  | 
PE2(config-router-targeted-peer)# targeted- peer ipv4 8.8.8.8  | Configure the targeted peer  | 
PE2(config-router-targeted-peer)#exit  | Exit targeted-peer-mode  | 
PE2(config-router)#exit  | Exit from router target peer and LDP mode  | 
PE2(config)#commit  | Commit the transaction  | 
PE2(config)#evpn 	mpls enable  | Enable EVPN MPLS Note:	Reload is required after Enabling or Disabling EVPN MPLS  | 
PE2(config)#evpn mpls vtep-ip-global 7.7.7.7	   | Configure VTEP global IP to loop-back IP  | 
PE2(config)#hardware-profile filter evpn-mpls- mh enable  | Enable hardware-profile filter EVPN-MPLS-MH  | 
PE2(config)#evpn mpls multihoming enable  | Enable Multi homing   | 
PE2(config)#commit  | Commit the transaction Reboot the system to bring up the ILM installation in hardware  | 
PE2(config)#interface xe21  | Enter the isnterface mode for xe21  | 
PE2(config-if)#ip address 123.1.1.2/24  | Configure IP address on the interface  | 
PE2(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
PE2(config-if)#label-switching  | Enable label switching on the interface  | 
PE2(config-if)#exit  | Exit the interface mode  | 
PE2(config)#commit  | Commit the transaction  | 
PE2(config)#router ospf 1  | Enter the Router OSPF mode  | 
PE2(config-router)#ospf router-id 7.7.7.7  | Router-ID configurations  | 
PE2(config-router)#network 7.7.7.7/32 area 0.0.0.0  | Advertise the loop-back address in OSPF  | 
PE2(config-router)#network 123.1.1.0/24  area 0.0.0.0  | Advertise the network address in OSPF  | 
PE2(config-router)#exit  | Exit the router OSPF mode and return to configure mode  | 
PE2(config)#commit  | Commit the candidate configuration to the  running configuration  | 
PE2(config)#router bgp 1  | Enter the Router BGP mode, ASN: 1  | 
PE2(config-router)#neighbor 1.1.1.1 remote- as 1  | Configure Neighbor as iBGP neighbor  | 
PE2(config-router)#neighbor 1.1.1.1 update- source lo  | Source of routing updates as loop-back  | 
PE2(config-router)#neighbor 8.8.8.8 remote- as 1  | Configure Neighbor as iBGP neighbor  | 
PE2(config-router)#neighbor 8.8.8.8 update- source lo  | Source of routing updates as loop-back  | 
PE2(config-router)#address-family l2vpn evpn  | Enter the address family mode as EVPN  | 
PE2(config-router-af)#neighbor 1.1.1.1 activate  | Enable EVPN Address family for neighbor  | 
PE2(config-router-af)#neighbor 8.8.8.8 activate  | Enable EVPN Address family for neighbor  | 
PE2(config-router-af)#exit  | Exit the Address family mode  | 
PE2(config)#commit  | Commit the transaction  | 
PE2(config)#mac vrf vrf2  | Enter VRF mode  | 
PE2(config-vrf)#rd 7.7.7.7:2  | Configure Route-Distinguisher value 7.7.7.7:2  | 
PE2(config-vrf)#route-target both 2:2  | Configure import and export value as 2:2 Support: route-target export route-target import  | 
PE2(config-vrf)#exit  | Exit the VRF Mode  | 
PE2(config)#interface po1  | Enter the Interface mode for po1  | 
PE2(config-if)#load-interval 30  | Load interval setting  | 
PE2(config-if)#evpn multi-homed system-mac 0000.aaaa.bbbc  | Configure ESI on a link on which Multi homed CE is connected  | 
PE2(config-if)#interface po1.2 switchport  | Create L2 sub interface of Dynamic LAG PO1  | 
PE2(config-if)#encapsulation dot1q 2  | Set Encapsulation to dot1q with VLAN ID 2 Supported Encapsulation: dot1ad, dot1q, untagged, default  | 
PE2(config-if)#access-if-evpn  | Enter Access mode for EVPN MPLS ID configuration  | 
PE2(config-access-if)#map vpn-id 2  | Map VPN-id 2 to interface xe2.2 (VPWS)  | 
PE2(config-access-if)#exit  | Exit out of access interface mode  | 
PE2(config-if)#interface xe5  | Enter the Interface mode for xe5  | 
PE2(config-if)#channel-group 1 mode active  | Move the interface to Dynamic LAG 1  | 
PE2(config)#commit  | Commit the transaction  | 
PE3#configure terminal  | Enter the configure mode  | 
PE3(config)#interface lo  | Enter the Interface mode for the loop-back interface  | 
PE3(config-if)#ip address 8.8.8.8/32 secondary  | Configure the IP address on loop-back interface  | 
PE3(config-if)#exit  | Exit interface mode  | 
PE3(config)#commit  | Commit the transaction  | 
PE3(config)#router ldp  | Enter the Router LDP mode  | 
PE3(config-router)#router-id 8.8.8.8  | Set the router ID to IP address 8.8.8.8  | 
PE3(config-router)#targeted-peer ipv4 1.1.1.1  | Configure the targeted peer  | 
PE3(config-router-targeted-peer)# targeted- peer ipv4 7.7.7.7  | Configure the targeted peer  | 
PE3(config-router-targeted-peer)#exit  | Exit targeted-peer-mode  | 
PE3(config-router)#exit  | Exit from router LDP mode  | 
PE3(config)#commit  | Commit the transaction  | 
PE3(config)#evpn mpls enable  | Enable EVPN MPLS  | 
PE3(config)#commit  | Commit candidate configuration to be running configuration  | 
PE3(config)#evpn mpls vtep-ip-global 8.8.8.8  | Configure VTEP global IP to loopback IP  | 
PE3(config)#hardware-profile filter evpn-mpls- mh enable  | Enable hardware-profile filter EVPN-MPLS-MH  | 
PE3(config)#evpn mpls multihoming enable  | Enable Multi homing  | 
PE3(config)#commit  | Commit the transaction Note:	Reboot the system to bring up the ILM installation in hardware  | 
PE3(config)#interface xe5  | Enter the Interface mode for xe5  | 
PE3(config-if)#ip address 124.1.1.2/24  | Configure IP address on the interface  | 
PE3(config-if)#enable-ldp ipv4  | Enable LDP on the physical interface  | 
PE3(config-if)#label-switching  | Enable label switching on the interface  | 
PE3(config-if)#exit  | Exit interface mode  | 
PE3(config-if)#interface xe4  | Enter the Interface mode for xe4  | 
PE3(config-if)#channel-group 1 mode active  | Move the Interface to Dynamic LAG 1  | 
PE3(config)#commit  | Commit the transaction  | 
PE2(config-if)#interface xe4  | Enter the Interface mode for xe4  | 
PE2(config-if)#channel-group 1 mode active  | Move the Interface to Dynamic LAG 1  | 
PE2(config)#commit  | Commit the transaction  | 
PE3(config)#router ospf 1  | Enter the Router OSPF mode  | 
PE3(config-router)#ospf router-id 8.8.8.8  | Router-ID configurations  | 
PE3(config-router)#network 8.8.8.8/32 area 0.0.0.0  | Advertise loopback address in OSPF  | 
PE3(config-router)#network 124.1.1.0/24  area 0.0.0.0  | Advertise network address in OSPF  | 
PE3(config-router)#exit  | Exit the router OSPF mode and return to Configure mode.  | 
PE3(config)#commit  | Commit the transaction  | 
PE3(config)#router bgp 1  | Enter the Router BGP mode, ASN: 1  | 
PE3(config-router)#neighbor 1.1.1.1 remote- as 1  | Configure Neighbor as iBGP neighbor  | 
PE3(config-router)#neighbor 1.1.1.1 update- source lo  | Source of routing updates as loop-back  | 
PE3(config-router)#neighbor 7.7.7.7 remote- as 1  | Configure Neighbor as iBGP neighbor  | 
PE3(config-router)#neighbor 7.7.7.7 update- source lo  | Source of routing updates as loop-back  | 
PE3(config-router)#address-family l2vpn evpn  | Enter into address family mode as EVPN  | 
PE3(config-router-af)#neighbor 1.1.1.1 activate  | Enable the EVPN address family for neighbor  | 
PE3(config-router-af)#neighbor 7.7.7.7 activate  | Enable the EVPN address family for neighbor  | 
PE3(config-router-af)#exit  | Exit the address family mode  | 
PE3(config)#commit  | Commit the transaction  | 
PE3(config)#mac vrf vrf2  | Enter VRF mode  | 
PE3(config-vrf)#rd 8.8.8.8:2  | Configure Route-Distinguisher value 8.8.8.8:2  | 
PE3(config-vrf)#route-target both 2:2  | Configure import and export value as 2:2  | 
PE3(config-vrf)#exit  | Exit VRF mode  | 
PE3(config)#evpn mpls id 2  xconnect target- mpls-id 52  | Configure the EVPN-VPWS identifier with source identifier    2 and target identifier 52  | 
PE3(config-evpn-mpls)#host-reachability- protocol evpn-bgp vrf2  | Map VRF "test" to EVPN-VPWS identifier  | 
PE3(config)#interface po1  | Enter the Interface mode for po1  | 
PE3(config-if)#load-interval 30  | Load interval setting  | 
PE3(config-if)#evpn multi-homed system-mac 0000.aaaa.bbbc  | Configure ESI on a link on which Multi homed CE is    connected  | 
PE3(config-if)#interface po1.2 switchport  | Create L2 sub interface of Dynamic LAG po1  | 
PE3(config-if)#encapsulation dot1q 2  | Set the encapsulation to dot1q with VLAN ID 2 supported encapsulation: dot1ad, dot1q, untagged, default  | 
PE3(config-if)#access-if-evpn  | Enter the access mode for EVPN MPLS ID configuration  | 
PE3(config-access-if)#map vpn-id 2  | Map VPN-id 2 to dynamic LAG sub interface po1.2 (VPWS)  | 
PE3(config-access-if)#exit  | Exit the access interface mode  | 
PE1(config)# ethernet cfm domain-type character-string domain-name 12346 level 7 mip-creation none  | Create CFM domain for EVPN ELINE with type as character string and set MIP creation to none  | 
PE1(config-ether-cfm-mpls-md)# service ma-type string ma-name 124  | Create MA type with string and set MIP creation to none  | 
PE1(config-ether-cfm-mpls-ma)# ethernet cfm mep up mpid 10 active true xe33.2 vlan 2  | Create up-MEP for local.  | 
PE1(config-ether-cfm-mpls-ma-mep)#cc multicast state enable  | Enable CC multicast  | 
PE1(config-ether-cfm-mpls-ma-mep)#exit-ether- ma-mep-mode  | Exit Ethernet MA-MEP-mode  | 
PE1(config-ether-cfm-mpls-ma)#  mep auto-discovery enable  | Enable auto discovery for R-MEP  | 
PE1(config-ether-cfm-mpls-ma)#cc interval 100  | Enable CC interval with value 2 that is 100 milliseconds  | 
PE1(config-ether-cfm-mpls-ma)#exit-ether-ma- mode  | Exit the Ethernet MA mode  | 
PE1(config-ether-cfm-mpls)#exit  | Exit the Ethernet CFM mode  | 
PE1(config)#exit  | Exit the configure mode  | 
PE1(config)#commit  | Commit the candidate configuration to the running configuration  | 
PE2(config)# ethernet cfm domain-type character-string domain-name 12346 level 7 mip-creation none  | Create CFM domain for EVPN ELINE with type as character string and set MIP creation to none  | 
PE2(config-ether-cfm-mpls-md)# service ma-type string ma-name 124  | Create MA type with string and set MIP creation to none  | 
PE2(config-ether-cfm-mpls-ma)# ethernet cfm mep up mpid 20 active true po1.2 vlan 2  | Create up-MEP for local MEP for VLAN 2  | 
PE2(config-ether-cfm-mpls-ma-mep)#cc multicast state enable  | Enable CC multicast  | 
PE2(config-ether-cfm-mpls-ma-mep)#exit-ether- ma-mep-mode  | Exit Ethernet MA-MEP-mode  | 
PE2(config-ether-cfm-mpls-ma)#  mep auto-discovery enable  | Enable mep auto-discovery   | 
PE2(config-ether-cfm-mpls-ma)#cc interval 100  | Enable CC interval with value 2 that is 100 milliseconds  | 
PE2(config-ether-cfm-mpls-ma)#exit-ether-ma- mode  | Exit ethernet MA mode  | 
PE2(config-ether-cfm-mpls)#exit  | Exit ethernet CFM mode  | 
PE2(config)#exit  | Exit from the configure mode  | 
PE2(config)#commit  | Commit the candidate configuration to the running configuration  | 
PE3(config)# ethernet cfm domain-type character-string domain-name 12346 level 7 mip-creation none  | Create CFM domain for EVPN ELINE with type as character string and set MIP creation to none  | 
PE3(config-ether-cfm-mpls-md)# service ma-type string ma-name 124  | Create MA type with string and set MIP creation to none  | 
PE3(config-ether-cfm-mpls-ma)# ethernet cfm mep up mpid 30 active true po1.2 vlan 2  | Create up-MEP for local MEP for VLAN 2  | 
PE3(config-ether-cfm-mpls-ma-mep)#cc multicast state enable  | Enable CC multicast  | 
PE3(config-ether-cfm-mpls-ma-mep)#exit-ether- ma-mep-mode  | Exit Ethernet MA-MEP-mode  | 
PE3(config-ether-cfm-mpls-ma)#  mep auto-discovery enable  | Enable mep auto-discovery   | 
PE3(config-ether-cfm-mpls-ma)#cc interval 100  | Enable CC interval with value 2 that is 100 milliseconds  | 
PE3(config-ether-cfm-mpls-ma)#exit-ether-ma- mode  | Exit ethernet MA mode  | 
PE3(config-ether-cfm-mpls)#exit  | Exit ethernet CFM mode  | 
PE3(config)#exit  | Exit from the configure mode  | 
PE3(config)#commit  | Commit the candidate configuration to the running configuration  | 

CE1#configure terminal  | Enter the configure mode  | 
CE1(config)#bridge 1 protocol ieee vlan-bridge  | Configure an IEEE VLAN-aware bridge  | 
CE1(config-if)#commit  | Commit the transaction  | 
CE1(config)#vlan database  | Enter VLAN configure mode  | 
CE1(config-vlan)#vlan 2001-3000 bridge 1 state enable  | Configure a VLAN and add it to the bridge  | 
CE1(config-vlan)#commit  | Commit the transaction  | 
CE1(config-vlan)#exit  | Exit the VLAN configuration mode  | 
CE1(config)#interface xe1  | Enter the interface mode for xe1  | 
CE1(config-if)#switchport  | Configure the interface as a layer 2 port  | 
CE1(config-if)#bridge-group 1  | Associate the interface to bridge-group 1  | 
CE1(config-if)#switchport mode trunk  | Configure the interface mode as trunk  | 
CE1(config-if)#switchport trunk allowed vlan all  | Allow all VLANs on interface xe1  | 
CE1(config-if)#commit  | Commit the transaction  | 
CE2#configure terminal  | Enter the configure mode  | 
CE2(config)#bridge 1 protocol ieee vlan-bridge  | Configure an IEEE VLAN-aware bridge  | 
CE2(config-if)#commit  | Commit the transaction  | 
CE2(config)#vlan database  | Enter VLAN configure mode  | 
CE2(config-vlan)#vlan 2001-3000 bridge 1 state enable  | Configure a VLAN and add it to the bridge  | 
CE2(config-vlan)#commit  | Commit the transaction  | 
CE2(config-vlan)#exit  | Exit the VLAN configuration mode  | 
CE2(config)#interface xe1  | Enter the Interface mode for xe1  | 
CE2(config-if)#switchport  | Configure the interface as a layer 2 port  | 
CE2(config-if)#bridge-group 1  | Associate the interface to bridge-group 1  | 
CE2(config-if)#switchport mode trunk  | Configure the interface mode as trunk  | 
CE2(config-if)#switchport trunk allowed vlan all  | Allow all VLANs on interface xe1  | 
CE2(config-if)#commit  | Commit the transaction  | 
PE1#configure terminal  | Enter configure mode  | 
PE1(config)#interface lo  | Enter the interface mode for the loopback interface  | 
PE1(config-if)#ip address 1.1.1.1/32 secondary  | Configure IP address on loopback interface  | 
PE1(config-if)#commit  | Commit the transaction  | 
PE1(config-if)#exit  | Exit interface mode   | 
PE1(config)#router ldp  | Enter the router LDP mode  | 
PE1(config-router)#targeted-peer ipv4 4.4.4.4  | Configure the targeted peer  | 
PE1(config-router-targeted-peer)#exit-targeted-peer-mode  | Exit the targeted-peer-mode  | 
PE1(config-router)#commit  | Commit the transaction  | 
PE1(config-router)exit  | Exit the interface mode   | 
PE1(config)#interface xe2  | Enter the interface mode for xe2  | 
PE1(config-if)# load-interval 30  | Load interval setting  | 
PE1(config-if)# ip address 192.168.10.1/24  | Configure the IP address on the interface  | 
PE1(config-if)# label-switching  | Enable label switching on the interface  | 
PE1(config-if)# enable-ldp ipv4  | Enable LDP on the physical interface  | 
PE1(config-if)#commit  | Commit the transaction  | 
PE1(config-if)#exit  | Exit the interface mode   | 
PE1(config)#router ospf 1  | Enter the router OSPF mode  | 
PE1(config-router)# ospf router-id 1.1.1.1  | Configure the OSPF router-id  | 
PE1(config-router)# bfd all-interfaces  | Configure BFD  | 
PE1(config-router)# network 1.1.1.1/32 area 0.0.0.0  | Advertise the OSPF loopback address  | 
PE1(config-router)# network 192.168.10.0/24 area 0.0.0.0  | Advertise the OSPF network address   | 
PE1(config-router)#commit  | Commit the transaction  | 
PE1(config-router)#exit  | Exit the Interface mode   | 
PE1(config)#mpls l2-circuit test1 2001 4.4.4.4  | Configure the VC for PE2  | 
PE1(config-pseudowire)#commit  | Commit the pseudowire transaction  | 
PE1(config-pseudowire)#exit  | Exit pseudowire configure mode  | 
PE1(config)#interface xe1.2001 switchport  | Creating L2 sub interface of physical interface xe1  | 
PE1(config-if)#encapsulation default  | Configure encapsulation  | 
PE1(config-if)#rewrite push dot1q 2028  | Configure rewrite with push dot1q  | 
PE1(config-if)#access-if-vpws  | Create the VPWS access-port.  | 
PE1(config-acc-if-vpws)#mpls-l2-circuit test1 primary  | Add circuit-id on the sub-interface  | 
PE1(config-acc-if-vpws)#commit  | Commit the configuration   | 
PE1(config-acc-if-vpws)#exit  | Exit the configure mode  | 
PE1(config)#ethernet cfm domain-type character-string domain-name 12346 level 7 mip-creation none   | Create the CFM domain and set MIP creation to none  | 
PE1(config-ether-cfm)#service ma-type string ma-name 124  | Create MA type with string and set MIP creation to none  | 
PE1(config-ether-cfm-ma)#vpws test1  | Configure VPWS to associate to the MA  | 
PE1(config-ether-cfm-ma)#ethernet cfm mep up mpid 20 active true vpws test1  | Create MEP up on VPWS  | 
PE1(config-ether-cfm-ma-mep)#cc multicast state enable  | Enable CC multicast  | 
PE1(config-ether-cfm-ma-mep)#exit-ether-ma-mep-mode  | Exit Ethernet MA-MEP-mode  | 
PE1(config-ether-cfm-ma)#mep crosscheck mpid 10  | Configure cross check to remote MEP  | 
PE1(config-ether-cfm-ma)#cc interval 10ms  | Enable CC interval value 10 milliseconds  | 
PE1(config-ether-cfm-ma)#exit-ether-ma-mode  | Exit Ethernet MA-MEP-mode  | 
PE1(config-ether-cfm)#commit  | Commit the transaction   | 
PE1(config-ether-cfm)exit  | Exit the transaction   | 
PE1(config)#ethernet cfm loss-measurement profile-name SLM  | Configuring SLM profile  | 
PE1(config-cfm-lm)# measurement-type slm  | Configure measurement type as SLM  | 
PE1(config-cfm-lm)# measurement-interval 1  | Configure measurement interval  | 
PE1(config-cfm-lm)# intervals-stored 3  | Configure number of interval to be stored  | 
PE1(config-cfm-lm)# message-period 1s  | Specify message period interval time  | 
PE1(config-cfm-lm)#exit  | Exit the transaction from SLM  | 
PE1(config)#ethernet cfm loss-measurement profile-name LM  | Configure LM profile  | 
PE1(config-cfm-lm)# measurement-type lmm  | Configure measurement type as LMM  | 
PE1(config-cfm-lm)# measurement-interval 1  | Configure measurement interval  | 
PE1(config-cfm-lm)# intervals-stored 3  | Configure number of interval to be stored  | 
PE1(config-cfm-lm)# message-period 1s  | Specify message period interval time  | 
PE1(config-cfm-lm)#exit  | Exit the transaction from LM  | 
PE1(config)#ethernet cfm delay-measurement profile-name DM  | Configure the DM profile  | 
PE1(config-cfm-dm)# measurement-interval 1  | Specify the measurement-interval in minutes  | 
PE1(config-cfm-dm)# intervals-stored 2  | Set the number of completed measurement intervals to store  | 
PE1(config-cfm-dm)# message-period 1s  | Specify message period interval time  | 
PE2#config terminal  | Enter configure mode  | 
PE2(config)#interface lo  | Enter the Interface mode for the loopback interface  | 
PE2(config-if)#ip address 4.4.4.4/32 secondary  | Configure IP address on loopback interface  | 
PE2(config-if)#commit  | Commit the transaction  | 
PE2(config-if)#exit  | Exit interface mode   | 
PE2(config)#router ldp  | Enter the router LDP mode  | 
PE2(config-router)#targeted-peer ipv4 1.1.1.1  | Configure targeted peer  | 
PE2(config-router-targeted-peer)#exit-targeted-peer-mode  | Exit the targeted peer  | 
PE2(config-router)#commit  | Commit the transaction  | 
PE2(config-router)exit  | Exit interface mode   | 
PE2(config)#interface xe2  | Enter the Interface mode for xe2  | 
PE2(config-if)# load-interval 30  | Load interval setting  | 
PE2(config-if)# ip address 192.168.30.2/24  | Configure IP address on the interface  | 
PE2(config-if)# label-switching  | Enable label switching on the interface  | 
PE2(config-if)# enable-ldp ipv4  | Enable LDP on the physical interface  | 
PE2(config-if)#commit  | Commit the configuration  | 
PE2(config-if)#exit  | Exit interface mode   | 
PE2(config)#router ospf 1  | Enter the Router OSPF mode.  | 
PE2(config-router)# ospf router-id 4.4.4.4   | Configure the OSPF router-id  | 
PE2(config-router)# bfd all-interfaces  | Configure BFD on the OSPF interfaces   | 
PE2(config-router)# network 4.4.4.4/32 area 0.0.0.0  | Advertise loopback address in OSPF  | 
PE2(config-router)# network 192.168.30.0/24 area 0.0.0.0  | Advertise the OSPF network address  | 
PE2(config-router)#commit  | Commit the transaction  | 
PE2(config-router)#exit  | Exit interface mode  | 
PE2(config)#mpls l2-circuit test1 2001 1.1.1.1  | Configure the VC for PE1  | 
PE2(config-pseudowire)#commit  | Commit the Pseudowire transaction   | 
PE2(config-pseudowire)#exit  | Exit the Pseudowire transaction mode   | 
PE2(config)#interface xe1.2001 switchport  | Create the L2 sub interface of physical interface xe1  | 
PE2(config-if)# encapsulation default  | Set the encapsulation to default   | 
PE2(config-if)# rewrite push dot1q 2028  | Configure rewrite with push dot1q  | 
PE2(config-if)# access-if-vpws  | Configure VPWS   | 
PE2(config-acc-if-vpws)#  mpls-l2-circuit test1 primary  | Configure VPWS to bind an interface to a MPLS   | 
PE2(config-acc-if-vpws)#commit  | Commit the VPWS transaction  | 
PE2(config-acc-if-vpws)#exit  | Exit the VPWS transaction  | 
PE2(config)#ethernet cfm domain-type character-string domain-name 12346 level 7 mip-creation none   | Create CFM domain for MA type with string and set MIP creation to none  | 
PE2(config-ether-cfm)# service ma-type string ma-name 124  | Create the CFM MA type with string  | 
PE2(config-ether-cfm-ma)#vpws test1  | Configure VPWS to associate to the MA  | 
PE2(config-ether-cfm-ma)#ethernet cfm mep up mpid 10 active true vpws test1  | Create up-MEP for VPWS  | 
PE2(config-ether-cfm-ma-mep)#cc multicast state enable  | Enable CC multi cast to enable  | 
PE2(config-ether-cfm-ma-mep)#ethernet cfm delay-measurement reply dmm  | Configure the DMR  | 
PE2(config-ether-cfm-ma-mep)#ethernet cfm loss-measurement reply lmm  | Configure the LMR   | 
PE2(config-ether-cfm-ma-mep)#exit-ether-ma-mep-mode  | Exit Ethernet MP mode  | 
PE2(config-ether-cfm-ma)#mep crosscheck mpid 20  | Configure cross check to remote MEP   | 
PE2(config-ether-cfm-ma)#cc interval 10ms  | Enable CC interval with value 10 milliseconds  | 
PE2(config-ether-cfm-ma)#exit-ether-ma-mode  | Exit Ethernet MA mode  | 
PE2(config-ether-cfm)#commit  | Commit the transaction  | 
PE2(config-ether-cfm)exit  | Exit the VPWS transaction  | 
P1#configure terminal  | Enter configure mode  | 
P1(config)#interface lo  | Enter the Interface mode for the loopback interface  | 
P1(config-if)#ip address 2.2.2.2/32 secondary  | Commit the transaction  | 
P1(config-if)#commit  | Exit the Interface mode  | 
P1(config-if)#exit  | Configure IP address on loopback interface  | 
P1(config)#router ldp  | Enter the Router LDP mode  | 
P1(config-router)#transport-address ipv4 2.2.2.2  | Configure targeted peer  | 
P1(config-router)#commit  | Commit the transaction  | 
P1(config-router)exit  | Exit the transaction  | 
P1(config)#interface xe2  | Enter the Interface mode for xe2   | 
P1(config-if)# ip address 192.168.10.2/24  | Configure IP address on the interface  | 
P1(config-if)# label-switching  | Enable label switching on the interface  | 
P1(config-if)# enable-ldp ipv4  | Enable LDP on the physical interface  | 
P1(config-if)#commit  | Commit the transaction  | 
P1(config-if)#exit  | Exit the transaction  | 
P1(config)#interface xe1  | Enter the Interface mode for xe1   | 
P1(config-if)# ip address 192.168.20.1/24  | Configure IP address on the interface  | 
P1(config-if)# label-switching  | Enable label switching on the interface  | 
P1(config-if)# enable-ldp ipv4  | Enable LDP on the physical interface  | 
P1(config-if)#commit  | Commit the transaction  | 
P1(config-if)#exit  | Exit the transaction  | 
P1(config)#router ospf 1  | Enter the Router OSPF mode  | 
P1(config-router)# ospf router-id 2.2.2.2   | Configure the OSPF router-id  | 
P1(config-router)# bfd all-interfaces  | Configure the BFD  | 
P1(config-router)# network 2.2.2.2/32 area 0.0.0.0  | OSPF loopback address  | 
P1(config-router)# network 192.168.20.0/24 area 0.0.0.0  | Advertise OSPF network  | 
P1(config-router)# network 192.168.10.0/24 area 0.0.0.0  | Advertise OSPF network  | 
P1(config-router)#commit  | Commit the transaction  | 
P2#configure terminal  | Enter configure mode  | 
P2(config)#interface lo  | Enter the Interface mode for the loopback interface  | 
P2(config-if)#ip address 3.3.3.3/32 secondary  | Configure IP address on loopback interface  | 
P2(config-if)#commit  | Commit the transaction  | 
P2(config-if)#exit  | Exit the Interface mode  | 
P2(config)#router ldp  | Enter the Router LDP mode  | 
P2(config-router)#transport-address ipv4 3.3.3.3  | Configure targeted peer  | 
P2(config-router)#commit  | Commit the transaction  | 
P2(config-router)exit  | Exit the Interface mode  | 
P2(config)#interface xe1  | Enter the Interface mode for xe1  | 
P2(config-if)# ip address 192.168.20.2/24  | Configure IP address on the interface  | 
P2(config-if)# label-switching  | Enable label switching on the interface  | 
P2(config-if)# enable-ldp ipv4  | Enable LDP on the physical interface  | 
P2(config-if)#commit  | Commit the transaction   | 
P2(config-if)#exit  | Exit interface mode  | 
P2(config)#interface xe2  | Enter the Interface mode for xe2  | 
P2(config-if)# ip address 192.168.30.1/24  | Configure IP address on the interface  | 
P2(config-if)# label-switching  | Enable label switching on the interface  | 
P2(config-if)# enable-ldp ipv4  | Enable LDP on the physical interface  | 
P2(config-if)#commit  | Commit the transaction  | 
P2(config-if)#exit  | Exit interface mode  | 
P2(config)#router ospf 1  | Enter the Router OSPF mode  | 
P2(config-router)# ospf router-id 3.3.3.3   | Configure the OSPF router-id  | 
P2(config-router)# network 3.3.3.3/32 area 0.0.0.0  | Advertise loopback address in OSPF  | 
P2(config-router)# network 192.168.30.0/24  area 0.0.0.0  | Advertise OSPF network address      | 
P2(config-router)# network 192.168.20.0/24 area 0.0.0.0  | Advertise OSPF network address   | 
P2(config-router)#commit  | Commit the transaction  |