BFD管理
仅S5720-EI、S5720-HI、S5720I-SI、S5720S-SI、S5720-SI、S5735-S、S5735S-S、S5735-S-I、S5730-HI、S5730S-EI、S5730-SI、S5731-H-K、S5731-H、S5731-S、S5731S-H、S5731S-S、S5732-H、S5732-H-K、S6720-EI、S6720-HI、S6720S-EI、S6720S-SI、S6720-SI、S6730-H-K、S6730-H、S6730S-H、S6730-S和S6730S-S支持BFD功能。
数据模型
BFD的对应配置模型文件名为huawei-bfd.yang。
节点 |
说明 |
取值范围 |
备注 |
---|---|---|---|
/huawei-bfd:bfd/enable |
全局使能BFD功能。 |
布尔型,具体取值如下:
缺省为:false。 |
NA |
/huawei-bfd:bfd/bfd-session/session-name |
指定BFD会话的名称。 |
字符串形式,不支持空格,长度范围是1~15。当输入的字符串两端使用引号时,可在字符串中输入空格。 |
NA |
/huawei-bfd:bfd/bfd-session/default-destination-ip |
使能BFD会话绑定默认组播IP功能。 |
布尔型,具体取值如下:
此节点只能配置为true。 |
|
/huawei-bfd:bfd/bfd-session/config-destination-ip |
指定BFD会话绑定的对端IP地址。 |
点分十进制形式。 |
此节点与default-destination-ip节点必须选其一进行配置。 |
/huawei-bfd:bfd/bfd-session/vpn-instance-name |
指定BFD会话绑定的VPN实例名称。 |
字符串形式。 |
必须是已存在的VPN实例名称。 |
/huawei-bfd:bfd/bfd-session/out-interface |
指定绑定BFD会话的接口类型和接口编号。 |
字符串形式。 |
只能配置ietf-interfaces下已创建的接口。 若one-arm-echo为true时,此节点必须配置。 |
/huawei-bfd:bfd/bfd-session/source-ip |
BFD报文携带的源IP地址。 |
点分十进制形式。 |
若auto为true时,此节点必须配置。 |
/huawei-bfd:bfd/bfd-session/one-arm-echo |
单臂回声功能的BFD会话。 |
布尔型,具体取值如下:
缺省为:false。 |
NA |
/huawei-bfd:bfd/bfd-session/auto |
使能静态标识符(Local/Remote discriminator)自协商功能。 |
布尔型,具体取值如下:
缺省为:false。 |
NA |
/huawei-bfd:bfd/bfd-session/local-discriminator |
配置静态BFD会话的本地标识符。 |
整数形式,1~8191。 |
若auto为true时,此节点无法配置。 若one-arm-echo为true时,remote-discriminator节点无法配置。 |
/huawei-bfd:bfd/bfd-session/remote-discriminator |
配置静态BFD会话的远端标识符。 |
||
/huawei-bfd:bfd/bfd-session/detect-multiplier |
配置BFD会话的本地检测倍数。 |
整数形式,3~50。 缺省为:3。 |
NA |
/huawei-bfd:bfd/bfd-session/desired-min-tx-interval |
配置BFD报文的发送间隔(ms)。 |
整数形式,100~1000。 缺省为:1000。 说明:
当设备处于增强模式时,取值范围为:3~1000。 |
NA |
/huawei-bfd:bfd/bfd-session/desired-min-rx-interval |
配置BFD报文的接收间隔(ms)。 |
||
/huawei-bfd:bfd/bfd-session/min-interval |
配置BFD报文的发送间隔和接收间隔。 |
||
/huawei-bfd:bfd/bfd-session/commit |
使能提交BFD会话配置功能。 |
布尔型,具体取值如下:
此节点必须配置,只能配置为true。 |
NA |
配置BFD
本章节主要介绍通过edit-config方法对BFD进行配置。
操作 |
XPATH |
---|---|
edit-config |
/huawei-bfd:bfd |
数据需求
项目 |
数据 |
描述 |
---|---|---|
VPN实例名称 |
abc |
VPN实例名称为abc。 |
VPN实例地址族配置路由标识RD |
4:4 |
VPN实例地址族配置路由标识RD为4:4。 |
接口绑定的VPN实例 |
abc |
接口绑定的VPN实例名称为abc。 |
绑定VPN实例的接口名称和编号 |
Vlanif5 |
绑定VPN实例的接口为Vlanif5。 |
BFD功能 |
true |
全局使能BFD功能。 |
BFD会话名称 |
abc |
BFD会话名称为abc。 |
绑定的对端IP地址 |
10.10.10.1 |
BFD会话绑定的对端IP地址为10.10.10.1。 |
绑定的接口类型和接口编号 |
Vlanif5 |
绑定的接口为Vlanif5。 |
BFD报文携带的源IP地址 |
10.10.10.2 |
BFD报文携带的源IP地址为10.10.10.2。 |
BFD会话绑定的VPN实例名称 |
abc |
BFD会话绑定的VPN实例名称为abc。 |
静态标识符自协商功能 |
false |
关闭静态标识符自协商功能。 |
本地标识符 |
6 |
本地标识符为6。 |
远端标识符 |
8 |
远端标识符为8。 |
本地监测倍数 |
3 |
BFD会话本地监测倍数为3倍。 |
BFD报文发送间隔 |
500 |
发送间隔时间为500ms。 |
BFD报文接收间隔 |
500 |
接受间隔时间为500ms。 |
BFD会话提交功能 |
true |
提交BFD会话。 |
接口名称和编号 |
Vlanif5 |
创建Vlanif5接口。 |
接口类型 |
iana-if-type:propVirtual |
指定接口类型。 |
接口IP地址 |
10.10.10.2 |
接口下的IP地址为10.10.10.2。 |
掩码长度 |
24 |
掩码长度为24。 |
请求示例
<?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>
删除示例
<?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>
响应示例
配置成功响应示例
<?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>
配置失败响应示例
<?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>