SR-MPLS – S-BFD
1. Intro
In the previous post we configured a static LSP. That configuration is easy to configure but, like all static paths, cannot react to topology changes. If one of the links or nodes represented by your segments fail, then the entire path fails. Another disadvantage of this option is that it cannot inherently identify failures along the path.
However, you can enable a new version of Bidirectional Forwarding Detection (BFD) called Seamless BFD (S-BFD) that actively monitors the path. This shuts the path down when a failure is detected enabling you to move over to another backup or secondary path.
The test topology:

And the LSP config:
### The initial config:
set protocols source-packet-routing segment-list R1-TO-R8-primary inherit-label-nexthops
set protocols source-packet-routing segment-list R1-TO-R8-primary auto-translate
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 ip-address 17.0.0.3
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-1-R3 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 ip-address 17.0.0.6
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-2-R6 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 ip-address 17.0.0.7
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-3-R7 label-type node
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 ip-address 17.0.0.8
set protocols source-packet-routing segment-list R1-TO-R8-primary HOP-4-R8 label-type node
set protocols source-packet-routing source-routing-path R1-TO-R8 to 17.0.0.8
set protocols source-packet-routing source-routing-path R1-TO-R8 primary R1-TO-R8-primary
2. Config
First thing, let’s see what happens when R7 has a failure.
### Isolate R7:
root@R7# show | compare
[edit interfaces ge-0/0/2]
+ disable;
[edit interfaces ge-0/0/3]
+ disable;
[edit]
root@R7# commit
commit complete
### Our R1-to-R8 LSP is still UP, even though the path was broken by R7:
root@R1# run show spring-traffic-engineering lsp
To State LSPname
17.0.0.8 Up R1-TO-R8
### Ping is down, because R7 is isolated from the network:
root@R1# run ping 192.168.8.1 routing-instance Cust-A rapid count 100000
PING 192.168.8.1 (192.168.8.1): 56 data bytes
!!!!!!!..............................................................^C
### Even though our SPRING-TE path is down, the route still in the inet.3 table.
### This is preventing the alternate L-ISIS route to be used:
root@R1# run show route 17.0.0.8 table inet.3
inet.3: 6 destinations, 7 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
17.0.0.8/32 *[SPRING-TE/8] 00:01:38, metric 1, metric2 30
> to 17.1.3.3 via ge-0/0/2.0, Push 801008, Push 801007, Push 801006(top)
[L-ISIS/14] 5d 03:01:58, metric 30
> to 17.1.3.3 via ge-0/0/2.0, Push 801008
Note: Remember that in SR the path is computed on the ingress router, but there is no end to end signaling of the path at every router in the network line in RSVP. So a failure along the path is not signaled to the ingress router, so it will not mark the LSP as down.
We can clearly see the benefit of using S-BFD. At least the LSP would be down, another backup or secondary path could be used:
### On the remote router (R8) configure the local-discriminator:
root@R8# set protocols bfd sbfd local-discriminator 88
root@R8# show | compare
[edit protocols]
+ bfd {
+ sbfd {
+ local-discriminator 88;
+ }
+ }
root@R8# commit
commit complete
### On R1, configure S-BFD:
root@R1# show | compare
[edit protocols source-packet-routing source-routing-path R1-TO-R8 primary R1-TO-R8-primary]
+ bfd-liveness-detection {
+ sbfd {
+ remote-discriminator 88;
+ }
+ minimum-interval 1000;
+ multiplier 3;
+ }
[edit]
root@R1# commit
commit complete
### Now the LSP is down:
root@R1# run show spring-traffic-engineering lsp
To State LSPname
17.0.0.8 Down R1-TO-R8
root@R1# run show spring-traffic-engineering lsp detail
Name: R1-TO-R8
Tunnel-source: Static configuration
Tunnel Forward Type: SRMPLS
To: 17.0.0.8
Te-group-id: 0
State: Down
Path: R1-TO-R8-primary
Path Status: NA
Outgoing interface: NA
Auto-translate status: Enabled Auto-translate result: Node not found
Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A
BFD status: Not created BFD name: N/A
BFD remote-discriminator: 88(configured)
Segment ID : 128
ERO Valid: true
SR-ERO hop count: 4
Hop 1 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.3
SID type: None
Hop 2 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.6
SID type: None
Hop 3 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.7
SID type: None
Hop 4 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.8
SID type: None
### The SPRING TE path is withdrawn from the inet.3 table:
root@R1# run show route 17.0.0.8 table inet.3
inet.3: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
17.0.0.8/32 *[L-ISIS/14] 5d 03:25:35, metric 30
> to 17.1.3.3 via ge-0/0/2.0, Push 801008
### Ping resumes using the alternate route:
root@R1# run ping 192.168.8.1 routing-instance Cust-A rapid
PING 192.168.8.1 (192.168.8.1): 56 data bytes
!!!!!
--- 192.168.8.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.627/3.978/4.273/0.211 ms
### Let's restore the links on R7:
root@R7# show | compare
[edit interfaces ge-0/0/2]
- disable;
[edit interfaces ge-0/0/3]
- disable;
[edit]
root@R7# commit
commit complete
### Now the BFD is UP:
root@R1# run show spring-traffic-engineering sbfd
BFDname State
V4-srte_bfd_session-2 Up
### The LSP is also UP:
root@R1# run show spring-traffic-engineering lsp detail
Name: R1-TO-R8
Tunnel-source: Static configuration
Tunnel Forward Type: SRMPLS
To: 17.0.0.8
Te-group-id: 0
State: Up
Path: R1-TO-R8-primary
Path Status: NA
Outgoing interface: NA
Auto-translate status: Enabled Auto-translate result: Success
Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A
BFD status: Up BFD name: V4-srte_bfd_session-2
BFD remote-discriminator: 88(configured)
Segment ID : 128
ERO Valid: true
SR-ERO hop count: 4
Hop 1 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.3
SID type: 20-bit label, Value: 801003
Hop 2 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.6
SID type: 20-bit label, Value: 801006
Hop 3 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.7
SID type: 20-bit label, Value: 801007
Hop 4 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.8
SID type: 20-bit label, Value: 801008
### The route is in the inet.3 table:
root@R1# run show route table inet.3 17.0.0.8
inet.3: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
17.0.0.8/32 *[SPRING-TE/8] 00:02:42, metric 1, metric2 30
> to 17.1.3.3 via ge-0/0/2.0, Push 801008, Push 801007, Push 801006(top)
[L-ISIS/14] 5d 03:39:24, metric 30
> to 17.1.3.3 via ge-0/0/2.0, Push 801008
### Ping OK:
root@R1# run ping 192.168.8.1 routing-instance Cust-A rapid
PING 192.168.8.1 (192.168.8.1): 56 data bytes
!!!!!
--- 192.168.8.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.018/4.497/5.449/0.498 ms
### The important part, if we have a failure again, the LSP will be down:
root@R7# show | compare
[edit interfaces ge-0/0/2]
+ disable;
[edit interfaces ge-0/0/3]
+ disable;
root@R7# commit
commit complete
### S-BFD down:
root@R1# run show spring-traffic-engineering sbfd
BFDname State
V4-srte_bfd_session-2 Down
### LSP down:
root@R1# run show spring-traffic-engineering lsp detail
Name: R1-TO-R8
Tunnel-source: Static configuration
Tunnel Forward Type: SRMPLS
To: 17.0.0.8
Te-group-id: 0
State: Down
Path: R1-TO-R8-primary
Path Status: NA
Outgoing interface: NA
Auto-translate status: Enabled Auto-translate result: Success
Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A
BFD status: Down BFD name: V4-srte_bfd_session-2
BFD remote-discriminator: 88(configured)
Segment ID : 128
ERO Valid: true
SR-ERO hop count: 4
Hop 1 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.3
SID type: 20-bit label, Value: 801003
Hop 2 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.6
SID type: 20-bit label, Value: 801006
Hop 3 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.7
SID type: 20-bit label, Value: 801007
Hop 4 (Loose):
NAI: IPv4 Node ID, Node address: 17.0.0.8
SID type: 20-bit label, Value: 801008
### Ping quickly resumes using the alternate path:
root@R1# run ping 192.168.8.1 routing-instance Cust-A rapid count 1000000
PING 192.168.8.1 (192.168.8.1): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!......!!!!!!!!!!!!!!!
### The alternate route in the inet.3 table:
root@R1# run show route table inet.3 17.0.0.8
inet.3: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
17.0.0.8/32 *[L-ISIS/14] 5d 03:44:59, metric 30
> to 17.1.3.3 via ge-0/0/2.0, Push 801008
### Finally, we can see some tcpdump captures, notice the BFD port numbers.
### Source to destination (R1-to-R8) the sBFD packets are labeled, and the replay (R8-to-R1) is pure IP:
16:03:10.918217 MPLS (label 801007, exp 7, ttl 255) (label 801008, exp 7, [S], ttl 255) IP IP 17.0.0.8.4784 > localhost.7784: UDP, length 24
16:03:10.921391 IP 17.0.0.8.7784 > IP 17.0.0.1.4784: BFDv1, Multihop, State Up, Flags: [Control Plane Independent], length: 24
External Resources: