< Home

Configuring BFD

This section provides a sample of configuring BFD using the edit-config method.

Table 1 Configuring BFD

Operation

XPATH

edit-config

/huawei-bfd:bfd

Data Requirements

Table 2 Configuring BFD

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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic