configure terminal

<#-- a policy-map to soft-police at the reservation bandwidth -->
policy-map ${policy.name}
  class class-default
   police cir ${lsp.bandwidth?string.computer}
     conform-action set-mpls-exp-topmost-transmit 4
     exceed-action policed-dscp-transmit
     violate-action policed-dscp-transmit
!

<#-- the pseudowire -->
pseudowire-class ${lsp.name}
 encapsulation mpls
 preferred-path interface Tunnel${ifce.vlan} disable-fallback
!

<#-- the tunnel -->
interface Tunnel${ifce.vlan}
 description ${tunnel.description}
 ip unnumbered Loopback0
 tunnel destination ${lsp.to} <#-- the ip address of the internal-facing interface at the egress router -->
 tunnel mode mpls traffic-eng
 tunnel mpls traffic-eng priority 4 4
 tunnel mpls traffic-eng path-option 100 explicit name ${path.name}
!

<#-- the customer-facing subinterface -->
interface ${ifce.name}.${ifce.vlan}
 description ${ifce.description}
 encapsulation dot1Q ${ifce.vlan}
 xconnect ${path.egressLoopback} ${l2circuit.vcid} encapsulation mpls pw-class ${lsp.name}
 service-policy input ${policy.name}
!

<#-- the path -->
ip explicit-path name ${path.name} enable
 <#list path.hops as hop>
    next-address ${hop}
</#list>
!

end
