Using BFD with pseudowires is essentially just the process of creating a multi-hop BFD session like normal, and then telling the router to monitor the pseudowire peer via BFD.
First we create a multi-hop BFD template and map the remote pseudowire peer to the BFD template:
Next, we create a pseduowire template and configure BFD monitoring:
#R2
template type pseudowire PW_BFD
encapsulation mpls
signaling protocol ldp
monitor peer bfd local interface Loopback0
Finally, the template is applied to the pseudowire peer in the xconnect config:
#R2
l2vpn xconnect context XC1
member gi2 service-instance 10
member 6.6.6.6 10 template PW_BFD
Verification
We can verify the multi-hop session just like any other BFD multi-hop session. Notice that xconnect is the registered protocol, and that, as usual, echos cannot be used for multi-hop sessions.
Let’s now simulate failure a new way. We’ll apply an ACL to all of R6’s interfaces that block BFD control packets. This simulates a scenario in which OSPF is still up (somehow), or hasn’t yet hit the dead timer.
#R6
ip access-list extended BLOCK_BFD
10 deny udp any any eq 4784
20 permit ip any any
!
int GigabitEthernet2.36
ip access-group BLOCK_BFD in
int GigabitEthernet2.46
ip access-group BLOCK_BFD in
int GigabitEthernet2.56
ip access-group BLOCK_BFD in
Within just a few seconds, BFD goes down on R2 and informs the xconnect process. The AToM VC is now down:
Personally, I don’t really see the use case for this. It is much more complex than just running BFD for the IGP, and relying on the IGP for reachability to the pseudowire peer.