Date created: Friday, September 18, 2015 1:35:50 PM. Last modified: Friday, April 6, 2018 5:14:42 PM

Explicit Path for VRF (IOS)

In this example the service provider network is running a full mesh of MPLS-TE tunnels (although no constraints have been configured in this example, they are simply following the IGP shortest path). The customer provides and manages their own CPEs for their L3 VPN and want so stretch layer 2 VLANs between two sites (with dual CPEs and switches) by configuring L2TPv3 tunnels between their own CPEs.

The customer has created an L2TPv3 pseudowire between CPE1 and CPE3 which connects trunk interfaces on SW1 and SW3 and another L2TPv3 pseudowire between CPE2 and CPE4 connecting trunk interfaces on SW2 and SW4. However STP is configured for both test VLANs (10 and 20) to prevent layer 2 loops and within VLAN 10 SW4 is blocking the link to SW2 (which is actually the CPE1 to CPE3 pseudowire) and within VLAN 20 SW3 is blocking the link to SW1 (with is actually the CPE2 to CPE4 pseudowire).

To accommodate this the service provider has nailed up two static MPLS-TE tunnels that specifically route traffic for this customer's VRF around two differ paths on the network. The pseudowire between CPE1 and CPE3 always routes along the explicit path PE1 <-> PE2. The pseudowire between CPE2 and CPE4 always routes along the explicit path PE4 <-> PE3 <-> PE2.

LAN facing interfaces on the CPEs only need support 1500 byte MTU, layer 2 headers are excluded, even when a VLAN tag is included this doesn't need to be acommodated for. WAN facing interfaces on the customer routers (and thus CPE facing interfaces on PE's) need to support an MTU of 1518 + 20 (IPv4) + 4 (L2TPv3) = 1542. PE to PE interfaces need to support 1542 + 2x MPLS labels = 1550 octets.

PE configs with per-VRF tunnels and regular full mesh tunnels for all other traffic:

! PE1

ip vrf CUST1
 rd 10.0.0.1:65001
 bgp next-hop Loopback12 ! Rewrite the BGP VPNv4 next hop IP to this address on outbound UPDATE messages
 route-target export 65001:100
 route-target import 65001:100
!
mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel backup
mpls traffic-eng reoptimize timers frequency 30
!
interface Loopback0
 ip address 10.0.0.1 255.255.255.255
 ip ospf 1 area 0
!
interface Loopback12
 ip address 192.168.12.1 255.255.255.255
!
interface Tunnel2
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.2
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel3
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.3
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel4
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.4
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel2100
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.2
 tunnel mpls traffic-eng path-option 1 explicit name PE1_TO_PE2
!
interface Tunnel4100
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.4
 tunnel mpls traffic-eng path-option 1 explicit name PE1_TO_PE4
!
interface FastEthernet0/0
 description Link to PE2
 ip address 10.0.12.1 255.255.255.0
 ip ospf 1 area 0
 mpls traffic-eng tunnels
!
interface FastEthernet0/1
 description Link to PE4
 ip address 10.0.14.1 255.255.255.0
 ip ospf 1 area 0
 mpls traffic-eng tunnels
!
interface FastEthernet1/0
 description Link to CPE1
 ip vrf forwarding CUST1
 ip address 192.168.1.1 255.255.255.252
!
router ospf 1
 router-id 10.0.0.1
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
!
router bgp 123
 template peer-policy iBGP
  next-hop-self
  send-community both
 exit-peer-policy
 !
 template peer-session iBGP
  remote-as 123
  update-source Loopback0
 exit-peer-session
 !
 bgp log-neighbor-changes
 neighbor 10.0.0.2 inherit peer-session iBGP
 neighbor 10.0.0.3 inherit peer-session iBGP
 neighbor 10.0.0.4 inherit peer-session iBGP
 !
 address-family vpnv4
  neighbor 10.0.0.2 activate
  neighbor 10.0.0.2 send-community extended
  neighbor 10.0.0.2 inherit peer-policy iBGP
  neighbor 10.0.0.3 activate
  neighbor 10.0.0.3 send-community extended
  neighbor 10.0.0.3 inherit peer-policy iBGP
  neighbor 10.0.0.4 activate
  neighbor 10.0.0.4 send-community extended
  neighbor 10.0.0.4 inherit peer-policy iBGP
 exit-address-family
 !
 address-family ipv4 vrf CUST1
  redistribute connected
  neighbor 192.168.1.2 remote-as 65001
  neighbor 192.168.1.2 activate
  neighbor 192.168.1.2 next-hop-self
  neighbor 192.168.1.2 default-originate
 exit-address-family
!
! These are the BGP next hops updates in the CUST1 VRF are being re-written to
! on PEs 4 and 2 respectively, 'autoroute announce' is not used becasue this
! is between specific PEs for a specific VRF
!
ip route 192.168.42.4 255.255.255.255 Tunnel4100
ip route 192.168.214.2 255.255.255.255 Tunnel2100
!
ip explicit-path name PE1_TO_PE2 enable
 next-address 10.0.12.2
!
ip explicit-path name PE1_TO_PE4 enable
 next-address 10.0.14.4
!
mpls ldp router-id Loopback0 force




! PE2
ip vrf CUST1
 rd 10.0.0.2:65001
 bgp next-hop Loopback214
 route-target export 65001:100
 route-target import 65001:100
!
mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel backup
mpls traffic-eng reoptimize timers frequency 30
!
interface Loopback0
 ip address 10.0.0.2 255.255.255.255
 ip ospf 1 area 0
!
interface Loopback214
 ip address 192.168.214.2 255.255.255.255
!
interface Tunnel1
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.1
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel3
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.3
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel4
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.4
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel1100
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.1
 tunnel mpls traffic-eng path-option 1 explicit name PE2_TO_PE1
!
interface Tunnel4100
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.4
 tunnel mpls traffic-eng path-option 1 explicit name PE2_TO_PE4
!
interface FastEthernet0/0
 description Link to PE1
 ip address 10.0.12.2 255.255.255.0
 ip ospf 1 area 0
 mpls traffic-eng tunnels
!
interface FastEthernet0/1
 description Link to PE3
 ip address 10.0.23.2 255.255.255.0
 ip ospf 1 area 0
 mpls traffic-eng tunnels
!
interface FastEthernet1/0
 description Link to CPE3
 ip vrf forwarding CUST1
 ip address 192.168.3.1 255.255.255.252
!
interface FastEthernet1/1
 description Link to CPE4
 ip vrf forwarding CUST1
 ip address 192.168.4.1 255.255.255.252
!
router ospf 1
 router-id 10.0.0.2
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
!
router bgp 123
 template peer-policy iBGP
  next-hop-self
  send-community both
 exit-peer-policy
 !
 template peer-session iBGP
  remote-as 123
  update-source Loopback0
 exit-peer-session
 !
 bgp log-neighbor-changes
 neighbor 10.0.0.1 inherit peer-session iBGP
 neighbor 10.0.0.3 inherit peer-session iBGP
 neighbor 10.0.0.4 inherit peer-session iBGP
 !
 address-family ipv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.3 activate
  neighbor 10.0.0.4 activate
 exit-address-family
 !
 address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community extended
  neighbor 10.0.0.3 activate
  neighbor 10.0.0.3 send-community extended
  neighbor 10.0.0.3 inherit peer-policy iBGP
  neighbor 10.0.0.4 activate
  neighbor 10.0.0.4 send-community extended
  neighbor 10.0.0.4 inherit peer-policy iBGP
 exit-address-family
 !
 address-family ipv4 vrf CUST1
  redistribute connected
  neighbor 192.168.2.2 remote-as 65001
  neighbor 192.168.2.2 activate
  neighbor 192.168.2.2 next-hop-self
  neighbor 192.168.2.2 default-originate
  neighbor 192.168.3.2 remote-as 65001
  neighbor 192.168.3.2 activate
  neighbor 192.168.3.2 next-hop-self
  neighbor 192.168.3.2 default-originate
  neighbor 192.168.4.2 remote-as 65001
  neighbor 192.168.4.2 activate
  neighbor 192.168.4.2 next-hop-self
  neighbor 192.168.4.2 default-originate
 exit-address-family
!
ip route 192.168.12.1 255.255.255.255 Tunnel1100
ip route 192.168.42.4 255.255.255.255 Tunnel4100
!
ip explicit-path name PE2_TO_PE4 enable
 next-address 10.0.23.3
 next-address 10.0.34.4
!
ip explicit-path name PE2_TO_PE1 enable
 next-address 10.0.12.1
!
mpls ldp router-id Loopback0 force




! PE4
ip vrf CUST1
 rd 10.0.0.4:65001
 bgp next-hop Loopback42
 route-target export 65001:100
 route-target import 65001:100
!
mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel backup
mpls traffic-eng reoptimize timers frequency 30
!
interface Loopback0
 ip address 10.0.0.4 255.255.255.255
 ip ospf 1 area 0
!
interface Loopback42
 ip address 192.168.42.4 255.255.255.255
!
interface Tunnel1
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.1
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel2
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.2
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel3
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.3
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel1100
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.2
 tunnel mpls traffic-eng path-option 1 explicit name PE4_TO_PE1
!
interface Tunnel2100
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.2
 tunnel mpls traffic-eng path-option 1 explicit name PE4_TO_PE2
!
interface FastEthernet0/0
 description link to PE3
 ip address 10.0.34.4 255.255.255.0
 ip ospf 1 area 0
 mpls traffic-eng tunnels
!
interface FastEthernet0/1
 description Link to PE1
 ip address 10.0.14.4 255.255.255.0
 ip ospf 1 area 0
 mpls traffic-eng tunnels
!
interface FastEthernet1/0
 description link to CPE2
 ip vrf forwarding CUST1
 ip address 192.168.2.1 255.255.255.252
!
router ospf 1
 router-id 10.0.0.4
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
!
router bgp 123
 template peer-policy iBGP
  next-hop-self
  send-community both
 exit-peer-policy
 !
 template peer-session iBGP
  remote-as 123
  update-source Loopback0
 exit-peer-session
 !
 bgp log-neighbor-changes
 neighbor 10.0.0.1 inherit peer-session iBGP
 neighbor 10.0.0.2 inherit peer-session iBGP
 neighbor 10.0.0.3 inherit peer-session iBGP
 !
 address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community extended
  neighbor 10.0.0.2 activate
  neighbor 10.0.0.2 send-community extended
  neighbor 10.0.0.2 inherit peer-policy iBGP
  neighbor 10.0.0.3 activate
  neighbor 10.0.0.3 send-community extended
  neighbor 10.0.0.3 inherit peer-policy iBGP
 exit-address-family
 !
 address-family ipv4 vrf CUST1
  redistribute connected
  neighbor 192.168.2.2 remote-as 65001
  neighbor 192.168.2.2 activate
  neighbor 192.168.2.2 next-hop-self
  neighbor 192.168.2.2 default-originate
 exit-address-family
!
ip route 192.168.12.1 255.255.255.255 Tunnel1100
ip route 192.168.214.2 255.255.255.255 Tunnel2100
!
ip explicit-path name PE4_TO_PE2 enable
 next-address 10.0.34.3
 next-address 10.0.23.2
!
ip explicit-path name PE4_TO_PE1 enable
 next-address 10.0.14.1
!
mpls ldp router-id Loopback0 force




! PE3
mpls traffic-eng tunnels
mpls traffic-eng auto-tunnel backup
mpls traffic-eng reoptimize timers frequency 30
!
interface Loopback0
 ip address 10.0.0.3 255.255.255.255
 ip ospf 1 area 0
!
interface Tunnel1
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.1
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel2
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.2
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface Tunnel4
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination 10.0.0.4
 tunnel mpls traffic-eng autoroute announce
 tunnel mpls traffic-eng path-option 1 dynamic
!
interface FastEthernet0/0
 description Link to PE4
 ip address 10.0.34.3 255.255.255.0
 ip ospf 1 area 0
 mpls traffic-eng tunnels
!
interface FastEthernet0/1
 description Link to PE2
 ip address 10.0.23.3 255.255.255.0
 ip ospf 1 area 0
 mpls traffic-eng tunnels
!
router ospf 1
 router-id 10.0.0.3
 mpls traffic-eng router-id Loopback0
 mpls traffic-eng area 0
!
router bgp 123
 template peer-policy iBGP
  next-hop-self
  send-community both
 exit-peer-policy
 !
 template peer-session iBGP
  remote-as 123
  update-source Loopback0
 exit-peer-session
 !
 bgp log-neighbor-changes
 neighbor 10.0.0.1 inherit peer-session iBGP
 neighbor 10.0.0.2 inherit peer-session iBGP
 neighbor 10.0.0.4 inherit peer-session iBGP
 !
 address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community extended
  neighbor 10.0.0.2 activate
  neighbor 10.0.0.2 send-community extended
  neighbor 10.0.0.2 inherit peer-policy iBGP
  neighbor 10.0.0.4 activate
  neighbor 10.0.0.4 send-community extended
  neighbor 10.0.0.4 inherit peer-policy iBGP
 exit-address-family
!
mpls ldp router-id Loopback0 force

View from PE2:

PE2#show ip route
      10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
O        10.0.0.1/32 [110/2] via 10.0.0.1, 03:50:12, Tunnel1
C        10.0.0.2/32 is directly connected, Loopback0
O        10.0.0.3/32 [110/2] via 10.0.0.3, 03:42:55, Tunnel3
O        10.0.0.4/32 [110/3] via 10.0.0.4, 03:42:21, Tunnel4
C        10.0.12.0/24 is directly connected, FastEthernet0/0
L        10.0.12.2/32 is directly connected, FastEthernet0/0
O        10.0.14.0/24 [110/2] via 10.0.0.1, 03:50:12, Tunnel1
C        10.0.23.0/24 is directly connected, FastEthernet0/1
L        10.0.23.2/32 is directly connected, FastEthernet0/1
O        10.0.34.0/24 [110/2] via 10.0.0.3, 01:43:13, Tunnel3
      192.168.12.0/32 is subnetted, 1 subnets
S        192.168.12.1 is directly connected, Tunnel1100
      192.168.42.0/32 is subnetted, 1 subnets
S        192.168.42.4 is directly connected, Tunnel4100
      192.168.214.0/32 is subnetted, 1 subnets
C        192.168.214.2 is directly connected, Loopback214

PE2#show  int desc
Interface                      Status         Protocol Description
Fa0/0                          up             up       Link to PE1
Fa0/1                          up             up       Link to PE3
Fa1/0                          up             up       Link to CPE3
Fa1/1                          up             up       Link to CPE4
Lo0                            up             up
Lo214                          up             up
Tu1                            up             up
Tu3                            up             up
Tu4                            up             up
Tu1100                         up             up
Tu4100                         up             up


PE2#show mpls traffic-eng tunnels brief
Signalling  Summary:
    LSP Tunnels Process:            running
    Passive LSP Listener:           running
    RSVP Process:                   running
    Forwarding:                     enabled
    auto-tunnel:
        backup Enabled  (0 ), id-range:65436-65535
        onehop Disabled (0 ), id-range:65336-65435
        mesh   Disabled (0 ), id-range:64336-65335

    Periodic reoptimization:        every 30 seconds, next in 28 seconds
    Periodic FRR Promotion:         Not Running
    Periodic auto-tunnel:
        backup notinuse scan:       every 3600 seconds, next in 475 seconds
    Periodic auto-bw collection:    every 300 seconds, next in 179 seconds

P2P TUNNELS/LSPs:
TUNNEL NAME                      DESTINATION      UP IF      DOWN IF    STATE/PROT
PE2_t1                           10.0.0.1         -          Fa0/0      up/up
PE2_t3                           10.0.0.3         -          Fa0/1      up/up
PE2_t4                           10.0.0.4         -          Fa0/0      up/up
PE2_t1100                        10.0.0.1         -          Fa0/0      up/up
PE2_t4100                        10.0.0.4         -          Fa0/1      up/up
PE1_t2                           10.0.0.2         Fa0/0     -         up/up
PE1_t3                           10.0.0.3         Fa0/0     Fa0/1     up/up
PE1_t2100                        10.0.0.2         Fa0/0     -         up/up
PE3_t1                           10.0.0.1         Fa0/1     Fa0/0     up/up
PE3_t2                           10.0.0.2         Fa0/1     -         up/up
PE4_t2                           10.0.0.2         Fa0/0     -         up/up
PE4_t1100                        10.0.0.2         Fa0/0     -         up/up
PE4_t2100                        10.0.0.2         Fa0/1     -         up/up
Displayed 5 (of 5) heads, 2 (of 2) midpoints, 6 (of 6) tails


PE2#show mpls traffic-eng tunnels tu4

Name: PE2_t4                              (Tunnel4) Destination: 10.0.0.4
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 1, type dynamic (Basis for Setup, path weight 2)

  Config Parameters:
    Bandwidth: 0        kbps (Global)  Priority: 7  7   Affinity: 0x0/0xFFFF
    Metric Type: TE (default)
    AutoRoute: enabled  LockDown: disabled Loadshare: 0 [0] bw-based
    auto-bw: disabled
  Active Path Option Parameters:
    State: dynamic path option 1 is active
    BandwidthOverride: disabled  LockDown: disabled  Verbatim: disabled


  InLabel  :  -
  OutLabel : FastEthernet0/0, 17
  Next Hop : 10.0.12.1
  RSVP Signalling Info:
       Src 10.0.0.2, Dst 10.0.0.4, Tun_Id 4, Tun_Instance 126
    RSVP Path Info:
      My Address: 10.0.12.2
      Explicit Route: 10.0.12.1 10.0.14.1 10.0.14.4 10.0.0.4
      Record   Route:   NONE
      Tspec: ave rate=0 kbits, burst=1000 bytes, peak rate=0 kbits
    RSVP Resv Info:
      Record   Route:   NONE
      Fspec: ave rate=0 kbits, burst=1000 bytes, peak rate=0 kbits
  Shortest Unconstrained Path Info:
    Path Weight: 2 (TE)
    Explicit Route: 10.0.23.2 10.0.23.3 10.0.34.3 10.0.34.4
                    10.0.0.4
  History:
    Tunnel:
      Time since created: 3 hours, 56 minutes
      Time since path change: 1 hours, 57 minutes
      Number of LSP IDs (Tun_Instances) used: 126
    Current LSP: [ID: 126]
      Uptime: 1 hours, 57 minutes
      Selection: reoptimization
    Prior LSP: [ID: 27]
      ID: path option unknown
      Removal Trigger: reoptimization completed




PE2#show mpls traffic-eng tunnels tu4100

Name: PE2_t4100                           (Tunnel4100) Destination: 10.0.0.4
  Status:
    Admin: up         Oper: up     Path: valid       Signalling: connected
    path option 1, type explicit PE2_TO_PE4 (Basis for Setup, path weight 2)

  Config Parameters:
    Bandwidth: 0        kbps (Global)  Priority: 7  7   Affinity: 0x0/0xFFFF
    Metric Type: TE (default)
    AutoRoute: disabled LockDown: disabled Loadshare: 0 [0] bw-based
    auto-bw: disabled
  Active Path Option Parameters:
    State: explicit path option 1 is active
    BandwidthOverride: disabled  LockDown: disabled  Verbatim: disabled


  InLabel  :  -
  OutLabel : FastEthernet0/1, 24
  Next Hop : 10.0.23.3
  RSVP Signalling Info:
       Src 10.0.0.2, Dst 10.0.0.4, Tun_Id 4100, Tun_Instance 89
    RSVP Path Info:
      My Address: 10.0.23.2
      Explicit Route: 10.0.23.3 10.0.34.3 10.0.34.4 10.0.0.4
      Record   Route:   NONE
      Tspec: ave rate=0 kbits, burst=1000 bytes, peak rate=0 kbits
    RSVP Resv Info:
      Record   Route:   NONE
      Fspec: ave rate=0 kbits, burst=1000 bytes, peak rate=0 kbits
  Shortest Unconstrained Path Info:
    Path Weight: 2 (TE)
    Explicit Route: 10.0.23.2 10.0.23.3 10.0.34.3 10.0.34.4
                    10.0.0.4
  History:
    Tunnel:
      Time since created: 3 hours, 20 minutes
      Time since path change: 2 hours, 42 minutes
      Number of LSP IDs (Tun_Instances) used: 89
    Current LSP: [ID: 89]
      Uptime: 2 hours, 42 minutes



PE2#show bgp vpnv4 unicast vrf CUST1
BGP table version is 23, local router ID is 10.0.0.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 10.0.0.2:65001 (default for vrf CUST1)
     0.0.0.0          0.0.0.0                                0 i
 *>i 192.168.1.0/30   192.168.12.1             0    100      0 ?
 *>i 192.168.2.0/30   192.168.42.4             0    100      0 ?
 *   192.168.3.0/30   192.168.3.2              0             0 65001 ?
 *>                   0.0.0.0                  0         32768 ?
 *   192.168.4.0/30   192.168.4.2              0             0 65001 ?
 *>                   0.0.0.0                  0         32768 ?

Ping from SW4 to SW1 on VLAN 10, this runs over the CPE3-to-CPE2 pseudowire and takes the PE2-PE1 per-VRF-MPLS-TE-Tunnel:

Ping from SW3 to SW1 on VLAN 20, this runs over the CPE4-to-CPE2 pseudowire and takes the PE2-PE3-PE4 per-VRF-MPLS-TE-Tunnel:

CPE and switch configs for reference, SW1, CPE1, CPE3, SW3:

! SW1
!
spanning-tree vlan 10 forward-time 4
spanning-tree vlan 10 max-age 6
spanning-tree vlan 10 hello-time 1
spanning-tree vlan 10 priority 8192
spanning-tree vlan 20 forward-time 4
spanning-tree vlan 20 max-age 6
spanning-tree vlan 20 hello-time 1
spanning-tree vlan 20 priority 8192
vtp mode transparent
!
vlan 10,20
!
interface FastEthernet1/0
 description Link to CPE1
 switchport trunk allowed vlan 1,10,20,1002-1005
 switchport mode trunk
 spanning-tree vlan 20 cost 500
!
interface FastEthernet1/1
 description Link to SW2
 switchport trunk allowed vlan 1,10,20,1002-1005
 switchport mode trunk
!
interface Vlan10
 ip address 192.10.2.1 255.255.255.0
!
interface Vlan20
 ip address 192.20.2.1 255.255.255.0


! CPE1
!
xconnect logging pseudowire status
!
pseudowire-class L2TPv3
 encapsulation l2tpv3
 ip local interface FastEthernet0/0
!
interface FastEthernet0/0
 description Link to PE1
 ip address 192.168.1.2 255.255.255.252
!
interface FastEthernet0/1
 description Xconnect to CPE3
 no ip address
 no keepalive
 xconnect 192.168.3.2 100 encapsulation l2tpv3 pw-class L2TPv3
!
router bgp 65001
 bgp log-neighbor-changes
 neighbor 192.168.1.1 remote-as 123
 !
 address-family ipv4
  redistribute connected
  neighbor 192.168.1.1 activate
  neighbor 192.168.1.1 next-hop-self
 exit-address-family


! CPE3
!
xconnect logging pseudowire status
!
pseudowire-class L2TPv3
 encapsulation l2tpv3
 ip local interface FastEthernet0/0
!
interface FastEthernet0/0
 description Link to PE2
 ip address 192.168.3.2 255.255.255.252
!
interface FastEthernet0/1
 description Xconnec to CPE1
 no ip address
 no keepalive
 xconnect 192.168.1.2 100 encapsulation l2tpv3 pw-class L2TPv3
!
router bgp 65001
 bgp log-neighbor-changes
 neighbor 192.168.3.1 remote-as 123
 !
 address-family ipv4
  redistribute connected
  neighbor 192.168.3.1 activate
  neighbor 192.168.3.1 next-hop-self
 exit-address-family


! SW3
!
spanning-tree vlan 10 forward-time 4
spanning-tree vlan 10 max-age 6
spanning-tree vlan 10 hello-time 1
spanning-tree vlan 20 forward-time 4
spanning-tree vlan 20 max-age 6
spanning-tree vlan 20 hello-time 1
vtp mode transparent
!
vlan 10,20
!
interface FastEthernet1/0
 description Link to CPE1
 switchport trunk allowed vlan 1,10,20,1002-1005
 switchport mode trunk
 spanning-tree vlan 20 cost 500
!
interface FastEthernet1/1
 description Link to SW2
 switchport trunk allowed vlan 1,10,20,1002-1005
 switchport mode trunk
!
interface Vlan10
 ip address 192.10.2.1 255.255.255.0
!
interface Vlan20
 ip address 192.20.2.1 255.255.255.0


SW3#show spanning-tree brief
VLAN10
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc09.11f0.0001
             Cost        19
             Port        41 (FastEthernet1/0)
             Hello Time   1 sec  Max Age  6 sec  Forward Delay  4 sec

  Bridge ID  Priority    32768
             Address     cc0b.16f0.0001
             Hello Time   1 sec  Max Age  6 sec  Forward Delay  4 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD     0  8192 cc09.11f0.0001 128.41
FastEthernet1/1      128.42   128    19 FWD    19 32768 cc0b.16f0.0001 128.42


VLAN20
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc09.11f0.0002
             Cost        57
             Port        42 (FastEthernet1/1)
             Hello Time   1 sec  Max Age  6 sec  Forward Delay  4 sec

  Bridge ID  Priority    32768
             Address     cc0b.16f0.0002
             Hello Time   1 sec  Max Age  6 sec  Forward Delay  4 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128   500 BLK     0  8192 cc09.11f0.0002 128.41
FastEthernet1/1      128.42   128    19 FWD    38 32768 cc0c.18ac.0002 128.42

CPE and switch configs for reference, SW2, CPE2, CPE4, SW4:

! SW2
!
spanning-tree vlan 10 forward-time 4
spanning-tree vlan 10 max-age 6
spanning-tree vlan 10 hello-time 1
spanning-tree vlan 20 forward-time 4
spanning-tree vlan 20 max-age 6
spanning-tree vlan 20 hello-time 1
!
vlan 10,20
!
interface FastEthernet1/0
 description Link to CPE2
 switchport trunk allowed vlan 1,10,20,1002-1005
 switchport mode trunk
 spanning-tree vlan 10 cost 500
!
interface FastEthernet1/1
 description Link to SW1
 switchport trunk allowed vlan 1,10,20,1002-1005
 switchport mode trunk
!
interface Vlan10
 ip address 192.10.2.2 255.255.255.0
!
interface Vlan20
 ip address 192.20.2.2 255.255.255.0


! CPE2
!
xconnect logging pseudowire status
!
pseudowire-class L2TPv3
 encapsulation l2tpv3
 ip local interface FastEthernet0/0
!
interface FastEthernet0/0
 description Link to PE4
 ip address 192.168.2.2 255.255.255.252
!
interface FastEthernet0/1
 description Xconnect co CPE4
 no ip address
 no keepalive
 xconnect 192.168.4.2 100 encapsulation l2tpv3 pw-class L2TPv3
!
router bgp 65001
 bgp log-neighbor-changes
 neighbor 192.168.2.1 remote-as 123
 !
 address-family ipv4
  redistribute connected
  neighbor 192.168.2.1 activate
  neighbor 192.168.2.1 next-hop-self
 exit-address-family


! CPE4
!
xconnect logging pseudowire status
!
pseudowire-class L2TPv3
 encapsulation l2tpv3
 ip local interface FastEthernet0/0
!
interface FastEthernet0/0
 description Link to PE2
 ip address 192.168.4.2 255.255.255.252
!
interface FastEthernet0/1
 description Xconnect to CPE2
 no ip address
 no keepalive
 xconnect 192.168.2.2 100 encapsulation l2tpv3 pw-class L2TPv3
!
router bgp 65001
 bgp log-neighbor-changes
 neighbor 192.168.4.1 remote-as 123
 !
 address-family ipv4
  redistribute connected
  neighbor 192.168.4.1 activate
  neighbor 192.168.4.1 next-hop-self
 exit-address-family
!


! SW4
!
spanning-tree vlan 10 forward-time 4
spanning-tree vlan 10 max-age 6
spanning-tree vlan 10 hello-time 1
spanning-tree vlan 20 forward-time 4
spanning-tree vlan 20 max-age 6
spanning-tree vlan 20 hello-time 1
vtp mode transparent
!
vlan 10,20
!
interface FastEthernet1/0
 description Link to CPE4
 switchport trunk allowed vlan 1,10,20,1002-1005
 switchport mode trunk
 spanning-tree vlan 10 cost 500
!
interface FastEthernet1/1
 description Link to SW3
 switchport trunk allowed vlan 1,10,20,1002-1005
 switchport mode trunk
!
interface Vlan10
 ip address 192.10.2.4 255.255.255.0
!
interface Vlan20
 ip address 192.20.2.4 255.255.255.0



SW4#show spanning-tree bri
VLAN10
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc09.11f0.0001
             Cost        38
             Port        42 (FastEthernet1/1)
             Hello Time   1 sec  Max Age  6 sec  Forward Delay  4 sec

  Bridge ID  Priority    32768
             Address     cc0c.18ac.0001
             Hello Time   1 sec  Max Age  6 sec  Forward Delay  4 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128   500 BLK    19 32768 cc0a.1170.0001 128.41
FastEthernet1/1      128.42   128    19 FWD    19 32768 cc0b.16f0.0001 128.42


VLAN20
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc09.11f0.0002
             Cost        38
             Port        41 (FastEthernet1/0)
             Hello Time   1 sec  Max Age  6 sec  Forward Delay  4 sec

  Bridge ID  Priority    32768
             Address     cc0c.18ac.0002
             Hello Time   1 sec  Max Age  6 sec  Forward Delay  4 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD    19 32768 cc0a.1170.0002 128.41
FastEthernet1/1      128.42   128    19 FWD    38 32768 cc0c.18ac.0002 128.42