OcNOS SP : OpenConfig Command Reference : BFD OpenConfig Translation
BFD OpenConfig Translation
Create BFD Sessions over Routing Protocols
ISIS
For information on ISIS configuration, refer the section Configure Interface BFD Parameter.
OSPF
For information on OSPF configuration, refer the section Create OSPF Process.
BGP
For information on BGP configuration, refer the section Create BGP Neighbors.
Static Routes
For information on Static Routes configuration, refer the chapter Static Route OpenConfig Translation.
Configuration
Use this configuration to create BFD sessions over routing protocols.
OpenConfig NetConf Payload
Here is a sample OpenConfig NetConf Payload to create BFD sessions over routing protocols.
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:STATIC</identifier>
<name>static-routes</name>
<static-routes>
<static>
<prefix>30.1.1.0/24</prefix>
<next-hops>
<next-hop>
<index>20.1.1.3</index>
<config>
<next-hop>20.1.1.3</next-hop>
<index>20.1.1.3</index>
</config>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
</enable-bfd>
</next-hop>
</next-hops>
<config>
<prefix>30.1.1.0/24</prefix>
</config>
</static>
</static-routes>
</protocol>
</protocols>
</network-instance>
<network-instance>
<name>management</name>
</network-instance>
</network-instances>
OcNOS CLI Command
The below CLI command is used to create BFD sessions over routing protocols.
interface eth1
ip address 20.1.1.2/24
!
interface eth2
ip address 10.1.1.1/24
!
ip route 30.1.1.0/24 20.1.1.3
ip static 30.1.1.0/24 20.1.1.3 fall-over-bfd enable
commit
OcNOS NetConf Payload
Here is a sample OcNOS NetConf Payload to create BFD sessions over routing protocols.
<routing xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-rib">
<static-routes>
<ipv4>
<routes>
<route>
<destination-prefix>30.1.1.0/24</destination-prefix>
<gateway-address>20.1.1.3</gateway-address>
<config>
<destination-prefix>30.1.1.0/24</destination-prefix>
<gateway-address>20.1.1.3</gateway-address>
<bfd-state>enable</bfd-state>
</config>
</route>
</routes>
</ipv4>
</static-routes>
</routing>
Validation with NetConf get
Here is the NetConf validation response:
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:STATIC</identifier>
<name>static-routes</name>
<static-routes>
<static>
<prefix>30.1.1.0/24</prefix>
<next-hops>
<next-hop>
<index>20.1.1.3</index>
<config>
<next-hop>20.1.1.3</next-hop>
<index>20.1.1.3</index>
</config>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
</enable-bfd>
</next-hop>
</next-hops>
<config>
<prefix>30.1.1.0/24</prefix>
</config>
</static>
</static-routes>
</protocol>
</protocols>
</network-instance>
<network-instance>
<name>management</name>
</network-instance>
</network-instances>
Restrictions
None.
Configure BFD Interface Intervals
Release
This configuration was introduced in OcNOS version 6.6.0.
Configuration
Use this configuration to configure BFD interface intervals.
OpenConfig NETCONF Payload
Here is a sample OpenConfig NetConf Payload to configure BFD interface intervals.
<bfd xmlns="http://openconfig.net/yang/bfd">
<interfaces>
<interface>
<id>eth1</id>
<config>
<id>eth1</id>
<enabled>true</enabled>
<desired-minimum-tx-interval>100</desired-minimum-tx-interval>
<required-minimum-receive>200</required-minimum-receive>
<detection-multiplier>4</detection-multiplier>
</config>
<interface-ref>
<config>
<interface>eth1</interface>
</config>
</interface-ref>
</interface>
</interfaces>
</bfd>
OcNOS CLI command
The below CLI command is used to configure BFD interface intervals.
interface eth1
bfd interval 100 minrx 200 multiplier 4
commit
OcNOS NETCONF Payload
Here is a sample OcNOS NetConf Payload to configure BFD interface intervals.
<bfd xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bfd">
<interfaces>
<interface>
<name>eth1</name>
<config>
<name>eth1</name>
</config>
<intervals>
<interval>
<desired-minimum-tx-interval>100</desired-minimum-tx-interval>
<required-minimum-rx-interval>200</required-minimum-rx-interval>
<detection-multiplier>4</detection-multiplier>
<config>
<desired-minimum-tx-interval>100</desired-minimum-tx-interval>
<required-minimum-rx-interval>200</required-minimum-rx-interval>
<detection-multiplier>4</detection-multiplier>
</config>
</interval>
</intervals>
</interface>
</interfaces>
</bfd>
Validation with NETCONF get
Here is a NetConf validation response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<bfd xmlns="http://openconfig.net/yang/bfd">
<interfaces>
<interface>
<id>eth1</id>
<config>
<id>eth1</id>
<enabled>true</enabled>
<desired-minimum-tx-interval>100</desired-minimum-tx-interval>
<required-minimum-receive>200</required-minimum-receive>
<detection-multiplier>4</detection-multiplier>
</config>
<interface-ref>
<config>
<interface>eth1</interface>
</config>
<state>
<interface>eth1</interface>
</state>
</interface-ref>
<state>
<enable-per-member-link>false</enable-per-member-link>
<id>eth1</id>
<enabled>true</enabled>
<desired-minimum-tx-interval>100</desired-minimum-tx-interval>
<required-minimum-receive>200</required-minimum-receive>
<detection-multiplier>4</detection-multiplier>
</state>
</interface>
</interfaces>
</bfd>
</data>
</rpc-reply>
Restrictions
The command /bfd/interfaces/interface[id='eth1']/config uses ipi-oc-bfd-deviations to set a constraint on OpenConfig where all three intervals attributes must be set together. So leaves desired-minimum-tx-interval, required-minimum-receive and detection-multiplier must be present in payload so that it can be accepted. For deletion, operation “delete” or “remove” must be present in the three attributes at the same time.
/bfd/interfaces/interface[id='eth1']/interface-ref/config/interface must be the same as /bfd/interfaces/interface/id.
Disable BFD on Interface
Release
This configuration was introduced in OcNOS version 6.6.0.
Configuration
Use this configuration to disable BFD on interface.
OpenConfig NETCONF Payload
Here is a sample OpenConfig NetConf Payload to disable BFD on interface.
<bfd xmlns="http://openconfig.net/yang/bfd">
<interfaces>
<interface>
<id>eth1</id>
<config>
<id>eth1</id>
<enabled>false</enabled>
</config>
<interface-ref>
<config>
<interface>eth1</interface>
</config>
</interface-ref>
</interface>
</interfaces>
</bfd>
OcNOS CLI command
The below CLI command is used to disable BFD on interface.
interface eth1
bfd disable
commit
OcNOS NETCONF Payload
Here is a sample OcNOS NetConf Payload to disable BFD on interface.
<bfd xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bfd">
<interfaces>
<interface>
<name>eth1</name>
<config>
<name>eth1</name>
<bfd-disabled />
</config>
</interface>
</interfaces>
</bfd>
Validation with NETCONF get
Here is a NetConf validation response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<bfd xmlns="http://openconfig.net/yang/bfd">
<interfaces>
<interface>
<id>eth1</id>
<config>
<id>eth1</id>
<enabled>false</enabled>
</config>
<interface-ref>
<config>
<interface>eth1</interface>
</config>
<state>
<interface>eth1</interface>
</state>
</interface-ref>
<state>
<enable-per-member-link>false</enable-per-member-link>
<id>eth1</id>
<enabled>false</enabled>
</state>
</interface>
</interfaces>
</bfd>
</data>
</rpc-reply>
 
Restrictions
/bfd/interfaces/interface[id='eth1']/interface-ref/config/interface must be the same as /bfd/interfaces/interface/id.
Validate BFD micro-bfd-sessions state
Release
This configuration was introduced in OcNOS version 6.6.0.
Validation
Use these commands to validate BFD micro-bfd-sessions state. Micro BFD sessions are created automatically for each member-interface of the aggregated link when a session is configured in a PO or SA interface.
Get OpenConfig Payload
This filter for the Get operation results in the Get OpenConfig Return output shown below.
<bfd xmlns="http://openconfig.net/yang/bfd">
<interfaces>
<interface>
<id>po1</id>
<micro-bfd-sessions>
<micro-bfd-session>
<state />
</micro-bfd-session>
</micro-bfd-sessions>
</interface>
</interfaces>
</bfd>
Get OpenConfig Return
This validation response provides information on the configuration and runtime to validate BFD micro-bfd-sessions state.
<bfd xmlns="http://openconfig.net/yang/bfd">
<interfaces>
<interface>
<id>po1</id>
<micro-bfd-sessions>
<micro-bfd-session>
<member-interface>xe12</member-interface>
<state>
<member-interface>xe12</member-interface>
<remote-session-state>UP</remote-session-state>
<remote-diagnostic-code>NO_DIAGNOSTIC</remote-diagnostic-code>
<remote-discriminator>1</remote-discriminator>
<session-state>UP</session-state>
<local-diagnostic-code>NO_DIAGNOSTIC</local-diagnostic-code>
</state>
</micro-bfd-session>
</micro-bfd-sessions>
</interface>
</interfaces>
</bfd>
Validate BFD Peers State
Release
This configuration was introduced in OcNOS version 6.6.0.
Validation
Use these commands to validate BFD peers state.
Get OpenConfig Payload
This filter for the Get operation results in the Get OpenConfig Return output shown below.
<bfd xmlns="http://openconfig.net/yang/bfd">
<interfaces>
<interface>
<id>eth1</id>
<peers>
<peer>
<state />
</peer>
</peers>
</interface>
</interfaces>
</bfd>
Get OpenConfig Return
This validation response provides information on the configuration and runtime to validate BFD peers state.
<<bfd xmlns="http://openconfig.net/yang/bfd">
<interfaces>
<interface>
<id>eth1</id>
<peers>
<peer>
<local-discriminator>1</local-discriminator>
<state>
<remote-authentication-enabled>false</remote-authentication-enabled>
<remote-address>10.1.1.2</remote-address>
<local-address>10.1.1.1</local-address>
<remote-discriminator>1</remote-discriminator>
<local-discriminator>1</local-discriminator>
<session-state>UP</session-state>
<local-diagnostic-code>NO_DIAGNOSTIC</local-diagnostic-code>
<remote-minimum-receive-interval>250</remote-minimum-receive-interval>
<echo>
<up-transitions>1</up-transitions>
<transmitted-packets>0</transmitted-packets>
<active>false</active>
</echo>
<async>
<up-transitions>1</up-transitions>
<transmitted-packets>1683</transmitted-packets>
<received-packets>1683</received-packets>
</async>
<demand-mode-requested>false</demand-mode-requested>
<subscribed-protocols
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:ISIS</subscribed-protocols>
</state>
</peer>
</peers>
</interface>
</interfaces>
</bfd>