BFD and MPLS ping on LDP's LSP


https://www.juniper.net/documentation/en_US/junos/topics/concept/policy-bfd-static-routes-understanding.html


https://www.youtube.com/watch?v=Hyp2OzDM7vI




show configuration protocols ldp
Tunnel LDP and BFD config
root@ACX5048-R103> show configuration protocols ldp
interface ge-0/0/0.0;
interface lo0.0;
oam {
    fec 10.99.92.177/32;
    bfd-liveness-detection {
        minimum-interval 300;
    }
    lsp-ping-interval 30;
}



root@ACX5048-R203> show configuration protocols ldp
interface ge-0/0/0.0;
interface xe-0/0/46.0;
interface lo0.0;
oam {
    fec 10.99.92.95/32;
    bfd-liveness-detection {
        minimum-interval 300;
    }
    lsp-ping-interval 30;
}

show bfd session
2x bfd session ( one in each direction)
{master:0}
root@ACX5048-R103> show lldp neighbors
Local Interface    Parent Interface    Chassis Id          Port info          System Name
ge-0/0/0           -                   0c:86:10:32:0d:00   503                ACX5048-R203



root@ACX5048-R103> show bfd session
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.99.92.177             Up                       0.900     0.300        3
127.0.0.64               Up        ge-0/0/0.0     0.900     0.300        3

2 sessions, 2 clients
Cumulative transmit rate 6.7 pps, cumulative receive rate 6.7 pps


{master:0}
root@ACX5048-R203> show bfd session
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.99.92.95              Up                       0.900     0.300        3
127.0.0.64               Up        ge-0/0/0.0     0.900     0.300        3

2 sessions, 2 clients
Cumulative transmit rate 6.7 pps, cumulative receive rate 6.7 pps


{master:0}
root@ACX5048-R203> show bfd session detail
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.99.92.95              Up                       0.900     0.300        3
 Client LDP-OAM, TX interval 0.050, RX interval 0.050
 Session up time 00:19:59, previous down time 00:00:03
 Local diagnostic None, remote diagnostic None
 Remote state Up, version 1
 Session type: Multi hop BFD
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
127.0.0.64               Up        ge-0/0/0.0     0.900     0.300        3
 Client LDP-OAM, TX interval 0.300, RX interval 0.300
 Session up time 00:19:59, previous down time 00:00:03
 Local diagnostic None, remote diagnostic None
 Remote state Up, version 1
 Session type: Multi hop BFD

2 sessions, 2 clients
Cumulative transmit rate 6.7 pps, cumulative receive rate 6.7 pps

show route table inet.3

ping mpls ldp <fec>

mpls lsp ping : echo request
{master:0}
root@ACX5048-R103> show route table inet.3

inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.99.92.177/32    *[LDP/9] 3d 03:41:00, metric 1
                    >  to 10.99.70.177 via ge-0/0/0.0


{master:0}
root@ACX5048-R103> show route table inet.3 detail

inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
10.99.92.177/32 (1 entry, 1 announced)
        State: <FlashAll>
        *LDP    Preference: 9
                Next hop type: Router, Next hop index: 0
                Address: 0xca31db0
                Next-hop reference count: 3
                Next hop: 10.99.70.177 via ge-0/0/0.0, selected
                Label element ptr: 0xcbda678
                Label parent element ptr: 0x0
                Label element references: 1
                Label element child references: 0
                Label element lsp id: 0
                Session Id: 0x0
                State: <Active Int>
                Local AS: 65100
                Age: 3d 4:13:05         Metric: 1
                Validation State: unverified
                Task: LDP
                Announcement bits (1): 2-Resolve tree 1
                AS path: I



{master:0}
root@ACX5048-R103> ping mpls ldp 10.99.92.177
!!!!!
--- lsping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss

mpls lsp ping
{master:0}
root@ACX5048-R203> ping mpls ldp 10.99.92.95 detail
Request for seq 1, to interface 550, no label stack., packet size 80
Reply for seq 1, return code: Egress-ok, time: 425417.211 ms
        Local transmit time: 2019-01-21 15:05:33 GMT 717.413 ms
        Remote receive time: 2019-01-21 15:12:39 GMT 134.624 ms
Request for seq 2, to interface 550, no label stack., packet size 80
Reply for seq 2, return code: Egress-ok, time: 425418.669 ms
        Local transmit time: 2019-01-21 15:05:34 GMT 714.967 ms
        Remote receive time: 2019-01-21 15:12:40 GMT 133.636 ms
Request for seq 3, to interface 550, no label stack., packet size 80
Reply for seq 3, return code: Egress-ok, time: 425417.673 ms
        Local transmit time: 2019-01-21 15:05:35 GMT 715.941 ms
        Remote receive time: 2019-01-21 15:12:41 GMT 133.614 ms
Request for seq 4, to interface 550, no label stack., packet size 80
Reply for seq 4, return code: Egress-ok, time: 425419.689 ms
        Local transmit time: 2019-01-21 15:05:36 GMT 723.916 ms
        Remote receive time: 2019-01-21 15:12:42 GMT 143.605 ms
Request for seq 5, to interface 550, no label stack., packet size 80
Reply for seq 5, return code: Egress-ok, time: 425418.444 ms
        Local transmit time: 2019-01-21 15:05:37 GMT 716.271 ms
        Remote receive time: 2019-01-21 15:12:43 GMT 134.715 ms

--- lsping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss

{master:0}
root@ACX5048-R203>
et protocols ldp oam ingress-policy ldp-oam
policy
{master:0}
root@ACX5048-R103> show configuration policy-options
policy-statement ldp-oam {
    term 10 {
        from {
            route-filter 10.99.92.0/24 prefix-length-range /32-/32 accept;
        }
    }
}

{master:0}
root@ACX5048-R103> show configuration policy-options | display set
set policy-options policy-statement ldp-oam term 10 from route-filter 10.99.92.0/24 prefix-length-range /32-/32 accept


root@ACX5048-R103> show configuration protocols ldp
interface ge-0/0/0.0;
interface lo0.0;
oam {
    ingress-policy ldp-oam;              <<<<<<<<<<<<< Applied here
    bfd-liveness-detection {
        minimum-interval 300;
    }
    lsp-ping-interval 30;
}

{master:0}
root@ACX5048-R103>