BFD Management
This section describes the configuration model of BFD management and provides examples of XML packets.
Data Model
The data model file matching BFD management is huawei-bfd.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-bfd:bfd/enable |
Indicates whether to enable BFD globally. |
The value is of the Boolean type:
The default value is false. |
N/A |
/huawei-bfd:bfd/bfd-session/session-name |
Indicates the name of a BFD session. |
The value is a string of 1 to 15 characters without spaces. When quotation marks are used around the string, spaces are allowed in the string. |
N/A |
/huawei-bfd:bfd/bfd-session/default-destination-ip |
Indicates whether to bind a BFD session to the default multicast IP address. |
The value is of the Boolean type:
This object can only be set to true. |
|
/huawei-bfd:bfd/bfd-session/config-destination-ip |
Indicates the peer IP address bound to a BFD session. |
The value is in dotted decimal notation. |
Either this object or the default-destination-ip object must be configured. |
/huawei-bfd:bfd/bfd-session/vpn-instance-name |
Indicates the name of a VPN instance bound to a BFD session. |
The value is a character string. |
The value must be the name of an existing VPN instance. |
/huawei-bfd:bfd/bfd-session/out-interface |
Indicates the type and number of the interface bound to a BFD session. |
The value is a character string. |
This object can only be set to an interface that has been created in ietf-interfaces. If one-arm-echo is set to true, this object must be configured. |
/huawei-bfd:bfd/bfd-session/source-ip |
Indicates the source IP address carried in BFD packets. |
The value is in dotted decimal notation. |
If auto is set to true, this object must be configured. |
/huawei-bfd:bfd/bfd-session/one-arm-echo |
Indicates the BFD session with the one-arm-echo function. |
The value is of the Boolean type:
The default value is false. |
NA |
/huawei-bfd:bfd/bfd-session/auto |
Indicates whether to enable automatic negotiation of local and remote discriminators. |
The value is of the Boolean type:
The default value is false. |
N/A |
/huawei-bfd:bfd/bfd-session/local-discriminator |
Indicates the local discriminator of static BFD sessions. |
The value is an integer in the range from 1 to 8191. |
If auto is set to true, this object cannot be configured. If one-arm-echo is set to true, remote-discriminator cannot be configured. |
/huawei-bfd:bfd/bfd-session/remote-discriminator |
Indicates the remote discriminator of static BFD sessions. |
||
/huawei-bfd:bfd/bfd-session/detect-multiplier |
Indicates the local detection multiplier of a BFD session. |
The value is an integer in the range from 3 to 50. The default value is 3. |
N/A |
/huawei-bfd:bfd/bfd-session/desired-min-tx-interval |
Indicates the interval for sending BFD packets, in milliseconds. |
The value is an integer in the range from 100 to 1000. The default value is 1000. NOTE:
When the device uses the enhanced mode, the value is an integer in the range from 3 to 1000. |
N/A |
/huawei-bfd:bfd/bfd-session/desired-min-rx-interval |
Indicates the interval for receiving BFD packets, in milliseconds. |
||
/huawei-bfd:bfd/bfd-session/min-interval |
Indicates the interval for sending and receiving BFD packets. |
||
/huawei-bfd:bfd/bfd-session/commit |
Indicates whether to submit the BFD session configuration. |
The value is of the Boolean type:
This object must be set to true. |
N/A |
Configuring BFD
This section provides a sample of configuring BFD using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
/huawei-bfd:bfd |
Data Requirements
Item |
Data |
Description |
---|---|---|
VPN instance name |
abc |
Set the name of a VPN instance to abc. |
RD for a VPN instance address family |
4:4 |
Set the RD for a VPN instance address family to 4:4. |
VPN instance bound to an interface |
abc |
Set the name of the VPN instance bound to the interface to abc. |
Name and number of the interface bound to the VPN instance |
Vlanif5 |
Bind the VPN instance to the interface Vlanif5. |
BFD |
true |
Enable BFD globally. |
BFD session name |
abc |
Set the name of a BFD session to abc. |
Peer IP address bound to a BFD session |
10.10.10.1 |
Bind a BFD session to the peer IP address 10.10.10.1. |
Type and number of the interface bound to a BFD session |
Vlanif5 |
Bind a BFD session to Vlanif5. |
Source IP address carried in BFD packets |
10.10.10.2 |
Set the source IP address carried in BFD packets to 10.10.10.2. |
Name of the VPN instance bound to a BFD session |
abc |
Set the name of the VPN instance bound to the BFD session to abc. |
Automatic negotiation of local and remote discriminators |
false |
Disable automatic negotiation of local and remote discriminators. |
Local discriminator |
6 |
Set the local discriminator to 6. |
Remote discriminator |
8 |
Set the remote discriminator to 8. |
Local detection multiplier |
3 |
Set the local detection multiplier of BFD sessions to 3. |
Interval for sending BFD packets |
500 |
Set the interval for sending BFD packets to 500 ms. |
Interval for receiving BFD packets |
500 |
Set the interval for receiving BFD packets to 500 ms. |
Whether to submit the BFD session configuration |
true |
Submit the BFD session configuration. |
Type and number of an interface |
Vlanif5 |
Create the interface Vlanif5. |
Interface type |
iana-if-type:propVirtual |
Set the interface type. |
Interface IP address |
10.10.10.2 |
Set the interface IP address to 10.10.10.2. |
Mask length |
24 |
Set the mask length to 24. |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9"> <edit-config> <target> <running/> </target> <config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-instance> <hw-l3vpn:vpn-instance-name>abc</hw-l3vpn:vpn-instance-name> <hw-bgp-vpn:ipv4-family xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:route-distinguisher>4:4</hw-bgp-vpn:route-distinguisher> </hw-bgp-vpn:ipv4-family> </hw-l3vpn:vpn-instance> </hw-l3vpn:vpn-instances> <hw-l3vpn:vpn-interfaces xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-interface> <hw-l3vpn:name>Vlanif5</hw-l3vpn:name> <hw-l3vpn:vpn-instance-name>abc</hw-l3vpn:vpn-instance-name> </hw-l3vpn:vpn-interface> </hw-l3vpn:vpn-interfaces> <hw-bfd:bfd xmlns:hw-bfd="urn:huawei:params:xml:ns:yang:huawei-bfd"> <hw-bfd:enable>true</hw-bfd:enable> <hw-bfd:bfd-session nc:operation="merge"> <hw-bfd:session-name>abc</hw-bfd:session-name> <hw-bfd:config-destination-ip>10.10.10.1</hw-bfd:config-destination-ip> <hw-bfd:vpn-instance-name>abc</hw-bfd:vpn-instance-name> <hw-bfd:out-interface>Vlanif5</hw-bfd:out-interface> <hw-bfd:source-ip>10.10.10.2</hw-bfd:source-ip> <hw-bfd:auto>false</hw-bfd:auto> <hw-bfd:local-discriminator>6</hw-bfd:local-discriminator> <hw-bfd:remote-discriminator>8</hw-bfd:remote-discriminator> <hw-bfd:detect-multiplier>3</hw-bfd:detect-multiplier> <hw-bfd:desired-min-tx-interval>500</hw-bfd:desired-min-tx-interval> <hw-bfd:required-min-rx-interval>500</hw-bfd:required-min-rx-interval> <hw-bfd:commit>true</hw-bfd:commit> </hw-bfd:bfd-session> </hw-bfd:bfd> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <if:interface> <if:name>Vlanif5</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type> <ip:ipv4 xmlns:ip="urn:ietf:params:xml:ns:yang:ietf-ip"> <ip:address> <ip:ip>10.10.10.2</ip:ip> <ip:prefix-length>24</ip:prefix-length> </ip:address> </ip:ipv4> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Deletion Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9"> <edit-config> <target> <running/> </target> <config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" nc:operation="delete"> <if:interface nc:operation="merge"> <if:name>Vlanif5</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type> <ip:ipv4 xmlns:ip="urn:ietf:params:xml:ns:yang:ietf-ip"> <ip:address> <ip:ip>10.10.10.2</ip:ip> <ip:prefix-length>24</ip:prefix-length> </ip:address> </ip:ipv4> </if:interface> </if:interfaces> <hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn" nc:operation="delete"> <hw-l3vpn:vpn-instance> <hw-l3vpn:vpn-instance-name>abc</hw-l3vpn:vpn-instance-name> <hw-bgp-vpn:ipv4-family xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:route-distinguisher>4:4</hw-bgp-vpn:route-distinguisher> </hw-bgp-vpn:ipv4-family> </hw-l3vpn:vpn-instance> </hw-l3vpn:vpn-instances> <hw-l3vpn:vpn-interfaces xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn" nc:operation="delete"> <hw-l3vpn:vpn-interface> <hw-l3vpn:name>Vlanif5</hw-l3vpn:name> <hw-l3vpn:vpn-instance-name>abc</hw-l3vpn:vpn-instance-name> </hw-l3vpn:vpn-interface> </hw-l3vpn:vpn-interfaces> <hw-bfd:bfd xmlns:hw-bfd="urn:huawei:params:xml:ns:yang:huawei-bfd" nc:operation="delete"> <hw-bfd:enable>true</hw-bfd:enable> <hw-bfd:bfd-session> <hw-bfd:session-name>abc</hw-bfd:session-name> <hw-bfd:config-destination-ip>10.10.10.1</hw-bfd:config-destination-ip> <hw-bfd:vpn-instance-name>abc</hw-bfd:vpn-instance-name> <hw-bfd:out-interface>Vlanif5</hw-bfd:out-interface> <hw-bfd:source-ip>10.10.10.2</hw-bfd:source-ip> <hw-bfd:auto>false</hw-bfd:auto> <hw-bfd:local-discriminator>6</hw-bfd:local-discriminator> <hw-bfd:remote-discriminator>8</hw-bfd:remote-discriminator> <hw-bfd:detect-multiplier>3</hw-bfd:detect-multiplier> <hw-bfd:desired-min-tx-interval>500</hw-bfd:desired-min-tx-interval> <hw-bfd:required-min-rx-interval>500</hw-bfd:required-min-rx-interval> <hw-bfd:commit>true</hw-bfd:commit> </hw-bfd:bfd-session> </hw-bfd:bfd> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9"> <ok/> </rpc-reply>
Sample of failed response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Please enable BFD in global mode first.</error-message> <error-info>Error on node /huawei-bfd:bfd/bfd-session[session-name="ab"]</error-info> </rpc-error> </rpc-reply>