Configuring Bidirectional Forwarding Detection (BFD)

This article describes how to configure BFD on FlexSwitch. It will discuss configuration using both the REST and CLI interfaces.

Releated Documents

Using the CLI to Configure BFD

For this tutorial we will enable BFD

localhost-56(config)#bfd enable
localhost-56(config)#apply
Applying Config:
id: 2   object: BfdGlobal   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command       attr         value      model attr    iskey    required    userprov    time provisioned
---------------------------------------------------------------------------------------------------------------
               bfdglobal    default    Vrf           True     X           X           Thu Jun 29 22:06:21 2017
 bfd enable    enable       True       Enable        False                X           Thu Jun 29 22:06:21 2017

sdk:updateBfdGlobal(default,Enable=True) result: SUCCESS: http status code: 500
WARNING return: Error: Nothing to be updated.

localhost-57(config)#bfd enable
localhost-57(config)#apply
Applying Config:
id: 2   object: BfdGlobal   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command       attr         value      model attr    iskey    required    userprov    time provisioned
---------------------------------------------------------------------------------------------------------------
               bfdglobal    default    Vrf           True     X           X           Thu Jun 29 22:07:05 2017
 bfd enable    enable       True       Enable        False                X           Thu Jun 29 22:07:05 2017

sdk:updateBfdGlobal(default,Enable=True) result: SUCCESS: http status code: 500
WARNING return: Error: Nothing to be updated.

Looks like they are both up. For this example we will run BFD in combination with BGP. Lets create a BFD session between two BGP neighbors

localhost-56(config)#router bgp 65001
localhost-56(config-router-bgp-65001)#neighbor ip 10.1.1.2
localhost-56(config-router-bgp-65001-neighbor-10.1.1.2)#peer_as 65002
localhost-56(config-router-bgp-65001-neighbor-10.1.1.2)#bfd true
localhost-56(config-router-bgp-65001-neighbor-10.1.1.2)#apply
Applying Config:
id: 19  object: BGPGlobal   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command             attr    value    model attr    iskey    required    userprov    time provisioned
--------------------------------------------------------------------------------------------------------------
 router bgp 65001    bgp     65001    ASNum         True     X           X           Thu Jun 29 22:10:29 2017

sdk:updateBGPGlobal(default,DefaultMED=0,Defaultv4Route=False,UseMultiplePaths=False,Defaultv6Route=False,ASNum=65001,Disabled=False,EBGPMaxPaths=0,EBGPAllowMultipleAS=False,RouterId=0.0.0.0,IBGPMaxPaths=0,Redistribution=[]) result: SUCCESS: http status code: 200


id: 24  object: BGPv4Neighbor   status: APPLIED CONFIG  valid: True delete: False num user cmds: 4
 command                 attr       value       model attr         iskey    required    userprov    time provisioned
-----------------------------------------------------------------------------------------------------------------------------
 router bgp 65001        bgp        65001                          True                 X           Thu Jun 29 22:10:34 2017
 neighbor ip 10.1.1.2    ip         10.1.1.2    NeighborAddress    True     X           X           Thu Jun 29 22:10:34 2017
 peer_as 65002           peer_as    65002       PeerAS             False                X           Thu Jun 29 22:10:49 2017
 bfd true                bfd        true        BfdEnable          False                X           Thu Jun 29 22:10:51 2017

sdk:createBGPv4Neighbor(,10.1.1.2,BfdEnable=True,RouteReflectorClusterId=0,RouteReflectorClient=False,MultiHopTTL=0,MaxPrefixesDisconnect=False,PeerAS=65002,KeepaliveTime=0,AddPathsMaxTx=0,AdjRIBInFilter=,AddPathsRx=False,UpdateSource=,PeerGroup=,MaxPrefixes=0,MaxPrefixesThresholdPct=80,MaxPrefixesRestartTimer=0,Description=,BfdSessionParam=default,AdjRIBOutFilter=,AuthPassword=,Disabled=False,MultiHopEnable=False,NextHopSelf=False,HoldTime=0,LocalAS=,ConnectRetryTime=0) result: SUCCESS: http status code: 201

And the same on the other side!

localhost-57(config)#router bgp 65002
localhost-57(config-router-bgp-65002)#neighbor ip 10.1.1.1
localhost-57(config-router-bgp-65002-neighbor-10.1.1.1)#peer_as 65001
localhost-57(config-router-bgp-65002-neighbor-10.1.1.1)#bfd true
localhost-57(config-router-bgp-65002-neighbor-10.1.1.1)#apply
Applying Config:
id: 19  object: BGPGlobal   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command             attr    value    model attr    iskey    required    userprov    time provisioned
--------------------------------------------------------------------------------------------------------------
 router bgp 65002    bgp     65002    ASNum         True     X           X           Thu Jun 29 22:10:59 2017

sdk:updateBGPGlobal(default,DefaultMED=0,Defaultv4Route=False,UseMultiplePaths=False,Defaultv6Route=False,ASNum=65002,Disabled=False,EBGPMaxPaths=0,EBGPAllowMultipleAS=False,RouterId=0.0.0.0,IBGPMaxPaths=0,Redistribution=[]) result: SUCCESS: http status code: 200


id: 24  object: BGPv4Neighbor   status: APPLIED CONFIG  valid: True delete: False num user cmds: 4
 command                 attr       value       model attr         iskey    required    userprov    time provisioned
-----------------------------------------------------------------------------------------------------------------------------
 router bgp 65002        bgp        65002                          True                 X           Thu Jun 29 22:11:05 2017
 neighbor ip 10.1.1.1    ip         10.1.1.1    NeighborAddress    True     X           X           Thu Jun 29 22:11:05 2017
 peer_as 65001           peer_as    65001       PeerAS             False                X           Thu Jun 29 22:11:13 2017
 bfd true                bfd        true        BfdEnable          False                X           Thu Jun 29 22:11:15 2017

sdk:createBGPv4Neighbor(,10.1.1.1,BfdEnable=True,RouteReflectorClusterId=0,RouteReflectorClient=False,MultiHopTTL=0,MaxPrefixesDisconnect=False,PeerAS=65001,KeepaliveTime=0,AddPathsMaxTx=0,AdjRIBInFilter=,AddPathsRx=False,UpdateSource=,PeerGroup=,MaxPrefixes=0,MaxPrefixesThresholdPct=80,MaxPrefixesRestartTimer=0,Description=,BfdSessionParam=default,AdjRIBOutFilter=,AuthPassword=,Disabled=False,MultiHopEnable=False,NextHopSelf=False,HoldTime=0,LocalAS=,ConnectRetryTime=0) result: SUCCESS: http status code: 201

Lets check if those sessions are up!

localhost-56(config)#show bfd session
Applying Show:

-------------------------------------------------------------------------------------------------------------------------------
 NeighAddr    LD/RD      Protocols    Multi    TxInt         RxInt         State    Int    TxPkts    RxPkts    Uptime
-------------------------------------------------------------------------------------------------------------------------------
 10.1.1.2     537/154    bgp,         3        250000(us)    250000(us)    up              1143      1104      4m37.315458496s
sdk:printBfdSessionStates() result: SUCCESS


localhost-57(config)#show bfd session
Applying Show:

-------------------------------------------------------------------------------------------------------------------------------
 NeighAddr    LD/RD      Protocols    Multi    TxInt         RxInt         State    Int    TxPkts    RxPkts    Uptime
-------------------------------------------------------------------------------------------------------------------------------
 10.1.1.1     154/537    bgp,         3        250000(us)    250000(us)    up              1104      1127      4m36.060495265s
sdk:printBfdSessionStates() result: SUCCESS

This is pretty basic, but we can also modify the session params for the BFD session. In this case we go to global config, create session params, and then attach them to the BFD session on BGP! Please note that when we change the multipler, the default intervals are set at 100000us for this param. That will be noted in the show outputs below!

localhost-56(config)#bfd param cfg_bfd
localhost-56(config-param-cfg_bfd)#multiplier 5
localhost-56(config-param-cfg_bfd)#apply
Applying Config:
id: 3   object: BfdSessionParam   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command              attr          value      model attr         iskey    required    userprov    time provisioned
----------------------------------------------------------------------------------------------------------------------------
 bfd param cfg_bfd    param         cfg_bfd    Name               True     X           X           Thu Jun 29 22:23:28 2017
 multiplier 5         multiplier    5          LocalMultiplier    False                X           Thu Jun 29 22:24:11 2017

sdk:createBfdSessionParam(cfg_bfd,DesiredMinTxInterval=1000,AuthenticationEnabled=False,DemandEnabled=False,RequiredMinRxInterval=1000,AuthKeyId=1,RequiredMinEchoRxInterval=0,AuthData=snaproute,AuthType=simple,LocalMultiplier=5) result: SUCCESS: http status code: 201


localhost-56(config)#router bgp 65001
localhost-56(config-router-bgp-65001)#neighbor ip 10.1.1.2
localhost-56(config-router-bgp-65001-neighbor-10.1.1.2)#bfd_session_param cfg_bfd
localhost-56(config-router-bgp-65001-neighbor-10.1.1.2)#apply
Applying Config:
id: 2   object: BGPGlobal   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command             attr    value    model attr    iskey    required    userprov    time provisioned
--------------------------------------------------------------------------------------------------------------
 router bgp 65001    bgp     65001    ASNum         True     X           X           Thu Jun 29 22:24:18 2017

sdk:updateBGPGlobal(default,DefaultMED=0,Defaultv4Route=False,UseMultiplePaths=False,Defaultv6Route=False,ASNum=65001,Disabled=False,EBGPMaxPaths=0,EBGPAllowMultipleAS=False,RouterId=10.1.1.1,IBGPMaxPaths=0,Redistribution=[]) result: SUCCESS: http status code: 200


id: 8   object: BGPv4Neighbor   status: APPLIED CONFIG  valid: True delete: False num user cmds: 3
 command                      attr                 value       model attr         iskey    required    userprov    time provisioned
--------------------------------------------------------------------------------------------------------------------------------------------
 router bgp 65001             bgp                  65001                          True                 X           Thu Jun 29 22:24:24 2017
 neighbor ip 10.1.1.2         ip                   10.1.1.2    NeighborAddress    True     X           X           Thu Jun 29 22:24:24 2017
 bfd_session_param cfg_bfd    bfd_session_param    cfg_bfd     BfdSessionParam    False                X           Thu Jun 29 22:24:32 2017

sdk:updateBGPv4Neighbor(,10.1.1.2,BfdEnable=True,RouteReflectorClusterId=0,RouteReflectorClient=False,MultiHopTTL=0,MaxPrefixesDisconnect=False,PeerAS=65002,KeepaliveTime=0,AddPathsMaxTx=0,AdjRIBInFilter=,AddPathsRx=False,UpdateSource=10.1.1.1,PeerGroup=,MaxPrefixes=0,MaxPrefixesThresholdPct=80,MaxPrefixesRestartTimer=0,Description=,BfdSessionParam=cfg_bfd,AdjRIBOutFilter=,AuthPassword=,Disabled=False,MultiHopEnable=False,NextHopSelf=False,HoldTime=0,LocalAS=,ConnectRetryTime=0) result: SUCCESS: http status code: 200


localhost-56(config)#show bfd session
Applying Show:

-----------------------------------------------------------------------------------------------------------------------------
 NeighAddr    LD/RD     Protocols    Multi    TxInt          RxInt          State    Int    TxPkts    RxPkts    Uptime
-----------------------------------------------------------------------------------------------------------------------------
 10.1.1.2     43/895    bgp,         5        1000000(us)    1000000(us)    up              3         6         1.854467405s
sdk:printBfdSessionStates() result: SUCCESS

And the same for the other side!

localhost-57(config)#bfd param cfg_bfd
localhost-57(config-param-cfg_bfd)#multiplier 5
localhost-57(config-param-cfg_bfd)#apply
Applying Config:
id: 1   object: BfdSessionParam   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command              attr          value      model attr         iskey    required    userprov    time provisioned
----------------------------------------------------------------------------------------------------------------------------
 bfd param cfg_bfd    param         cfg_bfd    Name               True     X           X           Thu Jun 29 22:24:43 2017
 multiplier 5         multiplier    5          LocalMultiplier    False                X           Thu Jun 29 22:24:45 2017

sdk:createBfdSessionParam(cfg_bfd,DesiredMinTxInterval=1000,AuthenticationEnabled=False,DemandEnabled=False,RequiredMinRxInterval=1000,AuthKeyId=1,RequiredMinEchoRxInterval=0,AuthData=snaproute,AuthType=simple,LocalMultiplier=5) result: SUCCESS: http status code: 201


localhost-57(config)#router bgp 65002
localhost-57(config-router-bgp-65002)#neighbor ip 10.1.1.1
localhost-57(config-router-bgp-65002-neighbor-10.1.1.1)#bfd_session_param cfg_bfd
localhost-57(config-router-bgp-65002-neighbor-10.1.1.1)#apply
Applying Config:
id: 10  object: BGPGlobal   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command             attr    value    model attr    iskey    required    userprov    time provisioned
--------------------------------------------------------------------------------------------------------------
 router bgp 65002    bgp     65002    ASNum         True     X           X           Thu Jun 29 22:24:50 2017

sdk:updateBGPGlobal(default,DefaultMED=0,Defaultv4Route=False,UseMultiplePaths=False,Defaultv6Route=False,ASNum=65002,Disabled=False,EBGPMaxPaths=0,EBGPAllowMultipleAS=False,RouterId=10.1.1.2,IBGPMaxPaths=0,Redistribution=[]) result: SUCCESS: http status code: 200


id: 19  object: BGPv4Neighbor   status: APPLIED CONFIG  valid: True delete: False num user cmds: 3
 command                      attr                 value       model attr         iskey    required    userprov    time provisioned
--------------------------------------------------------------------------------------------------------------------------------------------
 router bgp 65002             bgp                  65002                          True                 X           Thu Jun 29 22:25:01 2017
 neighbor ip 10.1.1.1         ip                   10.1.1.1    NeighborAddress    True     X           X           Thu Jun 29 22:25:01 2017
 bfd_session_param cfg_bfd    bfd_session_param    cfg_bfd     BfdSessionParam    False                X           Thu Jun 29 22:25:07 2017

sdk:updateBGPv4Neighbor(,10.1.1.1,BfdEnable=True,RouteReflectorClusterId=0,RouteReflectorClient=False,MultiHopTTL=0,MaxPrefixesDisconnect=False,PeerAS=65001,KeepaliveTime=0,AddPathsMaxTx=0,AdjRIBInFilter=,AddPathsRx=False,UpdateSource=10.1.1.2,PeerGroup=,MaxPrefixes=0,MaxPrefixesThresholdPct=80,MaxPrefixesRestartTimer=0,Description=,BfdSessionParam=cfg_bfd,AdjRIBOutFilter=,AuthPassword=,Disabled=False,MultiHopEnable=False,NextHopSelf=False,HoldTime=0,LocalAS=,ConnectRetryTime=0) result: SUCCESS: http status code: 200


localhost-57(config)#show bfd session
Applying Show:

-----------------------------------------------------------------------------------------------------------------------------
 NeighAddr    LD/RD     Protocols    Multi    TxInt          RxInt          State    Int    TxPkts    RxPkts    Uptime
-----------------------------------------------------------------------------------------------------------------------------
 10.1.1.1     149/43    bgp,         5        1000000(us)    1000000(us)    up              3         3         1.433470924s
sdk:printBfdSessionStates() result: SUCCESS

Done!

Curl

Ensure BFD is globally enabled

root@localhost-56:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/state/bfdglobal' | python -m json.tool
Enter host password for user 'root':
{
    "Object": {
        "Enable": true,
        "NumAdminDownSessions": 0,
        "NumDownSessions": 0,
        "NumTotalSessions": 0,
        "NumUpSessions": 0,
        "Vrf": "default"
    },
    "ObjectId": ""
}

root@localhost-57:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/state/bfdglobal' | python -m json.tool
Enter host password for user 'root':
{
    "Object": {
        "Enable": true,
        "NumAdminDownSessions": 0,
        "NumDownSessions": 0,
        "NumTotalSessions": 0,
        "NumUpSessions": 0,
        "Vrf": "default"
    },
    "ObjectId": ""
}

Setup BFD session param

root@localhost-56:~# curl -u root -sX POST -d '{"Name":"cfg_bfd","LocalMultiplier":5}' 'http://localhost:8080/public/v1/config/bfdsessionparam' | python -m json.tool
Enter host password for user 'root':
{
    "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",
    "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PATCH, DELETE",
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Max_age": "86400",
    "ObjectId": "efacda4e-9907-4714-47c7-e51a106d64c9",
    "Result": "Success"
}
root@localhost-56:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/state/bfdsessionparams' | python -m json.tool
Enter host password for user 'root':
{
    "CurrentMarker": 0,
    "MoreExist": false,
    "NextMarker": 0,
    "ObjCount": 2,
    "Objects": [
        {
            "Object": {
                "AuthenticationData": "",
                "AuthenticationEnabled": false,
                "AuthenticationKeyId": 0,
                "AuthenticationType": "",
                "DemandEnabled": false,
                "DesiredMinTxInterval": "250000(us)",
                "LocalMultiplier": 3,
                "Name": "default",
                "NumSessions": 0,
                "RequiredMinEchoRxInterval": "0(us)",
                "RequiredMinRxInterval": "250000(us)"
            },
            "ObjectId": ""
        },
        {
            "Object": {
                "AuthenticationData": "snaproute",
                "AuthenticationEnabled": false,
                "AuthenticationKeyId": 1,
                "AuthenticationType": "simple",
                "DemandEnabled": false,
                "DesiredMinTxInterval": "1000000(us)",
                "LocalMultiplier": 5,
                "Name": "cfg_bfd",
                "NumSessions": 0,
                "RequiredMinEchoRxInterval": "0(us)",
                "RequiredMinRxInterval": "1000000(us)"
            },
            "ObjectId": "efacda4e-9907-4714-47c7-e51a106d64c9"
        }
    ]
}

root@localhost-57:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/state/bfdsessionparams' | python -m json.tool
Enter host password for user 'root':
{
    "CurrentMarker": 0,
    "MoreExist": false,
    "NextMarker": 0,
    "ObjCount": 2,
    "Objects": [
        {
            "Object": {
                "AuthenticationData": "",
                "AuthenticationEnabled": false,
                "AuthenticationKeyId": 0,
                "AuthenticationType": "",
                "DemandEnabled": false,
                "DesiredMinTxInterval": "250000(us)",
                "LocalMultiplier": 3,
                "Name": "default",
                "NumSessions": 0,
                "RequiredMinEchoRxInterval": "0(us)",
                "RequiredMinRxInterval": "250000(us)"
            },
            "ObjectId": ""
        },
        {
            "Object": {
                "AuthenticationData": "snaproute",
                "AuthenticationEnabled": false,
                "AuthenticationKeyId": 1,
                "AuthenticationType": "simple",
                "DemandEnabled": false,
                "DesiredMinTxInterval": "1000000(us)",
                "LocalMultiplier": 5,
                "Name": "cfg_bfd",
                "NumSessions": 0,
                "RequiredMinEchoRxInterval": "0(us)",
                "RequiredMinRxInterval": "1000000(us)"
            },
            "ObjectId": "9074c740-17f2-4e4e-7d92-51790044b304"
        }
    ]
}

Notice that the second object is the newly created! Lets attach it to a new BGP session

root@localhost-56:~# curl -u root -sX PATCH -d '{"ASNum":"65001","RouterId":"10.1.1.1"}' 'http://localhost:8080/public/v1/config/bgpglobal' | python -m json.tool
Enter host password for user 'root':
{
    "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",
    "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PATCH, DELETE",
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Max_age": "86400",
    "ObjectId": "50870d4f-01c1-4bb6-6a53-1d38a40d1144",
    "Result": "Success"
}

root@localhost-56:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/config/bgpglobal' | python -m json.tool
Enter host password for user 'root':
{
    "Object": {
        "ASNum": "65001",
        "DefaultMED": 0,
        "Defaultv4Route": false,
        "Defaultv6Route": false,
        "Disabled": false,
        "EBGPAllowMultipleAS": false,
        "EBGPMaxPaths": 0,
        "IBGPMaxPaths": 0,
        "Redistribution": [],
        "RouterId": "10.1.1.1",
        "UseMultiplePaths": false,
        "Vrf": "default"
    },
    "ObjectId": "50870d4f-01c1-4bb6-6a53-1d38a40d1144"
}

root@localhost-57:~# curl -u root -sX PATCH -d '{"ASNum":"65002","RouterId":"10.1.1.2"}' 'http://localhost:8080/public/v1/config/bgpglobal' | python -m json.tool
Enter host password for user 'root':
{
    "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",
    "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PATCH, DELETE",
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Max_age": "86400",
    "ObjectId": "6fc0b4d3-daca-4c6b-5015-316ad72fba99",
    "Result": "Success"
}

root@localhost-57:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/config/bgpglobal' | python -m json.tool
Enter host password for user 'root':
{
    "Object": {
        "ASNum": "65002",
        "DefaultMED": 0,
        "Defaultv4Route": false,
        "Defaultv6Route": false,
        "Disabled": false,
        "EBGPAllowMultipleAS": false,
        "EBGPMaxPaths": 0,
        "IBGPMaxPaths": 0,
        "Redistribution": [],
        "RouterId": "10.1.1.2",
        "UseMultiplePaths": false,
        "Vrf": "default"
    },
    "ObjectId": "6fc0b4d3-daca-4c6b-5015-316ad72fba99"
}

And setup the neighbors!

root@localhost-56:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/state/bgpv4neighbors' | python -m json.tool
Enter host password for user 'root':
{
    "CurrentMarker": 0,
    "MoreExist": false,
    "NextMarker": 0,
    "ObjCount": 1,
    "Objects": [
        {
            "Object": {
                "AddPathsMaxTx": 0,
                "AddPathsRx": false,
                "AdjRIBInFilter": "",
                "AdjRIBOutFilter": "",
                "AuthPassword": "",
                "BfdNeighborState": "up",
                "ConnectRetryTime": 120,
                "Description": "",
                "Disabled": false,
                "HoldTime": 180,
                "IntfRef": "",
                "KeepaliveTime": 60,
                "LocalAS": "65001",
                "MaxPrefixes": 0,
                "MaxPrefixesDisconnect": false,
                "MaxPrefixesRestartTimer": 0,
                "MaxPrefixesThresholdPct": 80,
                "Messages": {
                    "Received": {
                        "Notification": 0,
                        "Update": 0
                    },
                    "Sent": {
                        "Notification": 0,
                        "Update": 0
                    }
                },
                "MultiHopEnable": false,
                "MultiHopTTL": 0,
                "NeighborAddress": "10.1.1.2",
                "NextHopSelf": false,
                "PeerAS": "65002",
                "PeerGroup": "",
                "PeerType": 1,
                "Queues": {
                    "Input": 0,
                    "Output": 0
                },
                "RouteReflectorClient": false,
                "RouteReflectorClusterId": 0,
                "SessionState": 3,
                "SessionStateDuration": "38.53194693s",
                "TotalPrefixes": 0,
                "UpdateSource": ""
            },
            "ObjectId": "ca3931e8-9ea1-435a-6bd3-4f24f88db5f2"
        }
    ]
}

The BFD session is up! Lets do the other side now.

root@localhost-57:~# curl -u root -sX POST -d '{"NeighborAddress":"10.1.1.1","PeerAS":"65001","BfdEnable":true,"BfdSessionParam":"cfg_bfd"}' 'http://localhost:8080/public/v1/config/bgpv4neighbor' | python -m json.tool
Enter host password for user 'root':
{
    "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",
    "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PATCH, DELETE",
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Max_age": "86400",
    "ObjectId": "0568b750-6487-48ba-588c-2b5cf6b365d4",
    "Result": "Success"
}

root@localhost-57:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/state/bgpv4neighbors' | python -m json.tool
Enter host password for user 'root':
{
    "CurrentMarker": 0,
    "MoreExist": false,
    "NextMarker": 0,
    "ObjCount": 1,
    "Objects": [
        {
            "Object": {
                "AddPathsMaxTx": 0,
                "AddPathsRx": false,
                "AdjRIBInFilter": "",
                "AdjRIBOutFilter": "",
                "AuthPassword": "",
                "BfdNeighborState": "up",
                "ConnectRetryTime": 120,
                "Description": "",
                "Disabled": false,
                "HoldTime": 180,
                "IntfRef": "",
                "KeepaliveTime": 60,
                "LocalAS": "65002",
                "MaxPrefixes": 0,
                "MaxPrefixesDisconnect": false,
                "MaxPrefixesRestartTimer": 0,
                "MaxPrefixesThresholdPct": 80,
                "Messages": {
                    "Received": {
                        "Notification": 0,
                        "Update": 0
                    },
                    "Sent": {
                        "Notification": 0,
                        "Update": 0
                    }
                },
                "MultiHopEnable": false,
                "MultiHopTTL": 0,
                "NeighborAddress": "10.1.1.1",
                "NextHopSelf": false,
                "PeerAS": "65001",
                "PeerGroup": "",
                "PeerType": 1,
                "Queues": {
                    "Input": 0,
                    "Output": 0
                },
                "RouteReflectorClient": false,
                "RouteReflectorClusterId": 0,
                "SessionState": 6,
                "SessionStateDuration": "27.392165402s",
                "TotalPrefixes": 0,
                "UpdateSource": ""
            },
            "ObjectId": "0568b750-6487-48ba-588c-2b5cf6b365d4"
        }
    ]
}

And lets confirm the BFD sessions!

root@localhost-56:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/state/bfdsessions' | python -m json.tool
Enter host password for user 'root':
{
    "CurrentMarker": 0,
    "MoreExist": false,
    "NextMarker": 0,
    "ObjCount": 1,
    "Objects": [
        {
            "Object": {
                "AuthSeqKnown": false,
                "AuthType": "",
                "DemandMode": false,
                "DesiredMinTxInterval": "1000000(us)",
                "DetectionMultiplier": 5,
                "InterfaceSpecific": false,
                "IntfRef": "",
                "IpAddr": "10.1.1.2",
                "LocalDiagType": "None",
                "LocalDiscriminator": 367,
                "LocalMacAddr": "",
                "NumRxPackets": 99,
                "NumTxPackets": 162,
                "ParamName": "cfg_bfd",
                "PerLinkSession": false,
                "ReceivedAuthSeq": 0,
                "RegisteredProtocols": "bgp, ",
                "RemoteDemandMode": false,
                "RemoteDetectionMultiplier": 5,
                "RemoteDiscriminator": 472,
                "RemoteMacAddr": "",
                "RemoteMinRxInterval": "1000000(us)",
                "RemoteSessionState": "up",
                "RequiredMinRxInterval": "1000000(us)",
                "SentAuthSeq": 0,
                "SessionId": 367,
                "SessionState": "up",
                "ToDownCount": 0,
                "ToUpCount": 1,
                "UpDuration": "1m34.981059333s"
            },
            "ObjectId": ""
        }
    ]
}

root@localhost-57:~# curl -u root -sX GET -d '{}' 'http://localhost:8080/public/v1/state/bfdsessions' | python -m json.tool
Enter host password for user 'root':
{
    "CurrentMarker": 0,
    "MoreExist": false,
    "NextMarker": 0,
    "ObjCount": 1,
    "Objects": [
        {
            "Object": {
                "AuthSeqKnown": false,
                "AuthType": "",
                "DemandMode": false,
                "DesiredMinTxInterval": "1000000(us)",
                "DetectionMultiplier": 5,
                "InterfaceSpecific": false,
                "IntfRef": "",
                "IpAddr": "10.1.1.1",
                "LocalDiagType": "None",
                "LocalDiscriminator": 472,
                "LocalMacAddr": "",
                "NumRxPackets": 117,
                "NumTxPackets": 111,
                "ParamName": "cfg_bfd",
                "PerLinkSession": false,
                "ReceivedAuthSeq": 0,
                "RegisteredProtocols": "bgp, ",
                "RemoteDemandMode": false,
                "RemoteDetectionMultiplier": 5,
                "RemoteDiscriminator": 367,
                "RemoteMacAddr": "",
                "RemoteMinRxInterval": "1000000(us)",
                "RemoteSessionState": "up",
                "RequiredMinRxInterval": "1000000(us)",
                "SentAuthSeq": 0,
                "SessionId": 472,
                "SessionState": "up",
                "ToDownCount": 0,
                "ToUpCount": 1,
                "UpDuration": "1m46.187939224s"
            },
            "ObjectId": ""
        }
    ]
}