No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
VRRP

VRRP

Data Model

The data model file matching the VRRP is huawei-vrrp.yang.

Table 3-1526 VRRP

Object

Description

vrrp

Indicates that the object of requesting an operation (creation, deletion, or modification) is the VRRP. It is a root object, which is only used to contain sub-objects.

huawei-vrrp:vrrp/vrrp-instance/interface-name

Indicates that the VRRP interface is supported. The value depends on the interface type and slot ID.

huawei-vrrp:vrrp/vrrp-instance/vrid

Indicates the ID of a VRRP group. The value is an integer that ranges from 1 to 255.

huawei-vrrp:vrrp/vrrp-instance/vrrp4/virtual-ip

Indicates the virtual IP address of a VRRP group. The value is in dotted decimal notation.

huawei-vrrp:vrrp/vrrp-instance/vrrp4/config-state

Indicates the configuration of a VRRP group.

active: The configuration of the VRRP group takes effective.

standby: The configuration of the VRRP group is ineffective temporarily.

huawei-vrrp:vrrp/vrrp-instance/vrrp4/timer

Indicates the interval for sending VRRP packets. The value is an integer, in seconds. In VRRPv2, the value ranges from 1 to 255. In VRRPv3, the value ranges from 1 to 40.

huawei-vrrp:vrrp/vrrp-instance/vrrp4/preempt-mode-flag

Preemption mode of the router in the VRRP group:

  • True: preemption mode
  • False: non-preemption mode

huawei-vrrp:vrrp/vrrp-instance/vrrp4/preempt-mode-delay

Preemption delay of the router in the VRRP group. The value is an integer that ranges from 0 to 3600, in seconds. The default value is 0.

huawei-vrrp:vrrp/vrrp-instance/track-interface/interface-name

Specifies the type and number of an interface monitored by a VRRP group.

NOTE:
  • The master and backup in the VRRP group must work in preemption mode. It is recommended that the preemption delay be 0 on the backup and larger than 0 on the master.
  • If the device is the IP address owner (the virtual router IP address is used as the actual interface address), you cannot associate a VRRP group with an interface.
  • Multiple VRRP groups can monitor an interface, and a VRRP group can monitor a maximum of 8 interfaces simultaneously.

huawei-vrrp:vrrp/vrrp-instance/track-interface/increased

Specifies the value by which the priority increases when the monitored interface becomes Down. The maximum value is 254. The value is an integer that ranges from 1 to 255.

huawei-vrrp:vrrp/vrrp-instance/track-interface/reduced

Specifies the value by which the priority decreases when the monitored interface becomes Down. The value is an integer that ranges from 1 to 255. The priority can decrease to 1. By default, when the monitored interface goes Down, the VRRP priority of the device decreases by 10.

huawei-vrrp:vrrp-info/ifname

Specifies an interface where a VRRP group is configured.

huawei-vrrp:vrrp-info/vrid-v4

Specifies the ID of a VRRP group.

huawei-vrrp:vrrp/vrrp-instance/vrrp-track-nqas/vrrp-track-nqa/admin-name

Specifies the administrator name of an NQA test instance. The value is a string of 1 to 32 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string.

NOTE:

V300R003C10 and later versions support this node.

huawei-vrrp:vrrp/vrrp-instance/vrrp-track-nqas/vrrp-track-nqa/test-name

Specifies the name of an NQA test instance. The value is a string of 1 to 32 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string.

NOTE:

V300R003C10 and later versions support this node.

huawei-vrrp:vrrp/vrrp-instance/vrrp-track-nqas/vrrp-track-nqa/priority-value

Specifies the value by which the master's priority reduces if the NQA test instance detects that the uplink is unavailable. The value is an integer that ranges from 1 to 255. The priority can decrease to 1. By default, the master's priority value decreases by 10 if the associated NQA test instance detects that the uplink is unavailable.

NOTE:

V300R003C10 and later versions support this node.

Creating a VRRP Group

This section provides a sample of creating a VRRP group.

Table 3-1527 Creating a VRRP group

Operation

XPATH

edit-config:merge

huawei-vrrp/vrrp/vrrp-instance

huawei-vrrp/vrrp/vrrp-instance/track-interface

Data Requirements
Table 3-1528 Creating a VRRP group

Item

Data

Description

VRRP interface

GigabitEthernet0/0/2.2

On GigabitEthernet0/0/2.2, create VRRP group 2 with the virtual IP address of 5.5.5.5. Set the preemption mode to immediate preemption and preemption delay to 100s. Associate VRRP group 2 with GigabitEthernet0/0/1, and set the value by which the priority of the router decreases to 10 when GigabitEthernet0/0/1 becomes Down.

VRID

2

Virtual IP address of a VRRP group

5.5.5.5

Preemption mode of the router in the VRRP group

true

Preemption delay of the router in the VRRP group

100

Type and number of the interface associated with a VRRP group

GigabitEthernet0/0/1

Value by which the priority decreases when the tracked interface becomes Down

10

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="200">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="merge">
     <name>GigabitEthernet0/0/2.2</name>
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
    </interface>
    <interface xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="merge">
     <name>GigabitEthernet0/0/1</name>
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
    </interface>
   </interfaces>
   <vrrp xmlns="urn:huawei:params:xml:ns:yang:huawei-vrrp">
    <vrrp-instance xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="merge">
     <interface-name>GigabitEthernet0/0/2.2</interface-name>
     <vrid>2</vrid>
     <vrrp4>
      <virtual-ip>5.5.5.5</virtual-ip>
      <preempt-mode-flag>true</preempt-mode-flag>
      <preempt-mode-delay>100</preempt-mode-delay>
     </vrrp4>
     <track-interface ns0:operation="merge">
      <interface-name>GigabitEthernet0/0/1</interface-name>
      <reduced>10</reduced>
     </track-interface>
    </vrrp-instance>
   </vrrp>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="200"> 
 <ok/> 
</rpc-reply> 

Deleting a VRRP Group

This section provides a sample of deleting a VRRP group.

Table 3-1529 Deleting a VRRP group

Operation

XPATH

edit-config:remove

huawei-vrrp/vrrp/vrrp-instance

huawei-vrrp/vrrp/vrrp-instance/track-interface

Data Requirements
Table 3-1530 Deleting a VRRP group

Item

Data

Description

VRRP interface

GigabitEthernet0/0/2.2

Delete VRRP group 2 with the virtual IP address of 5.5.5.5, the preemption mode configured as immediate preemption, and the preemption delay of 100s. Disassociate VRRP group 2 from GigabitEthernet0/0/1, and cancel the value of 10 by which the priority of the router decreases when GigabitEthernet0/0/1 becomes Down.

VRID

2

Virtual IP address of a VRRP group

5.5.5.5

Preemption mode of the router in the VRRP group

true

Preemption delay of the router in the VRRP group

100

Type and number of the interface associated with a VRRP group

GigabitEthernet0/0/1

Value by which the priority decreases when the tracked interface becomes Down

10

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="200">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="remove">
     <name>GigabitEthernet0/0/2.2</name>
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
    </interface>
    <interface xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="remove">
     <name>GigabitEthernet0/0/1</name>
     <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
    </interface>
   </interfaces>
   <vrrp xmlns="urn:huawei:params:xml:ns:yang:huawei-vrrp">
    <vrrp-instance xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="remove">
     <interface-name>GigabitEthernet0/0/2.2</interface-name>
     <vrid>2</vrid>
     <vrrp4>
      <virtual-ip>5.5.5.5</virtual-ip>
      <preempt-mode-flag>true</preempt-mode-flag>
      <preempt-mode-delay>100</preempt-mode-delay>
     </vrrp4>
     <track-interface ns0:operation="remove">
      <interface-name>GigabitEthernet0/0/1</interface-name>
      <reduced>10</reduced>
     </track-interface>
    </vrrp-instance>
   </vrrp>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="200"> 
 <ok/> 
</rpc-reply> 

Checking the VRRP Status

This section provides a sample of checking the VRRP status.

Table 3-1531 Checking the VRRP status

Operation

XPATH

edit-config: default

huawei-vrrp:vrrp-info

Data Requirements
Table 3-1532 Creating a VRRP group

Item

Data

Description

Interface configured with the VRRP group

GigabitEthernet0/0/0

Check the status of the VRRP group configured on GigabitEthernet0/0/0.

VRRP group ID

255

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
 <vrrp-info xmlns="urn:huawei:params:xml:ns:yang:huawei-vrrp"> 
  <ifname>GigabitEthernet0/0/0</ifname> 
  <vrid-v4>255</vrid-v4> 
 </vrrp-info> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013"> 
 <status xmlns="urn:huawei:params:xml:ns:yang:huawei-vrrp"> 
  <vrrp-status>initialize</vrrp-status> 
 </status> 
</rpc-reply>
Table 3-1533 Description of output information in the response example

Item

Description

vrrp-status

VRRP status of a router:

  • Master: indicates that the router functions as the master router in the VRRP group.
  • Backup: indicates that the router functions as the backup router in the VRRP group.
  • Initialize: All VRRP group begin in the Initialize state. When the interface where a VRRP group is configured becomes Down or is Administratively Down, the VRRP group status changes to Initialize.

Enabling VRRP to Implement Active/Standby Switchover by Monitoring the NQA Instance Status

NOTE:

This function is supported in V300R003C10 and later versions.

This section provides a sample of enabling VRRP to implement active/standby switchover by monitoring the NQA instance status.

Table 3-1534 Enabling VRRP to implement active/standby switchover by monitoring the NQA instance status

Operation

XPATH

edit-config:default

huawei-vrrp:vrrp/vrrp-instance/vrrp-track-nqas/vrrp-track-nqa

Data Requirements
Table 3-1535 Enabling VRRP to implement active/standby switchover by monitoring the NQA instance status

Item

Data

Description

Source interface for the NQA test instance

GigabitEthernet0/0/4

Associate VRRP with the NQA instance adminName on GigabitEthernet0/0/5. When the destination IP address is unreachable, the VRRP priority of the device where the interface resides decreases by 20. Set the parameters as follows:

  • Source interface for the NQA test instance: GigabitEthernet0/0/4
  • Management group name: adminName
  • NQA test instance name: testName
  • NQA test instance type: ping
  • Source IP address: 1.1.1.1
  • Destination IP address: 2.2.2.2
  • Next-hop IP address: 4.4.4.4
  • Count of NQA test instances: 4
  • Frequency: 39
  • Interval at which NQA test requests are sent: 5 seconds
  • Size of an NQA test instance packet: 50
  • TTL: 33
  • Service type: 2
  • Timeout period: 5 seconds
  • Description: Specifies the ping create description.
  • VRRP interface: GigabitEthernet0/0/5
  • VRRP group ID: 1
  • Virtual IP address of the VRRP group: 5.5.5.5

Management group name of the NQA test instance

adminName

Name of an NQA test instance

testName

Type of the NQA test instance

ping

Source IP address for the NQA test instance

1.1.1.1

Destination IP address for the NQA test instance

2.2.2.2

Next-hop IP address of the NQA test instance

4.4.4.4

Count of NQA test instances

4

Frequency of the NQA test instance

39

Interval at which NQA test requests are sent

5

Size of an NQA test instance packet

50

TTL value of packets for the NQA test instance

33

Service type of packets for the NQA test instance

2

Timeout period of a probe for the NQA test instance

5

Description for the NQA test instance

Specifies the ping create description.

VRRP interface

GigabitEthernet0/0/5

VRRP group ID

1

Virtual IP address of a VRRP group

5.5.5.5

Management group name of the NQA test instance

adminName

Name of an NQA test instance

testName

Value by which the priority reduces if the NQA test instance detects that the uplink is unavailable

20

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_54dab4150d2148d08fb9012b586071ba">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/4</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
    </interface>
   </interfaces>
   <testcase-config xmlns="urn:huawei:params:xml:ns:yang:huawei-nqa">
    <cases xc:operation="merge">
     <admin-name>adminName</admin-name>
     <test-name>testName</test-name>
     <type>ping</type>
     <case-input>
      <ping-case>
       <source-address>1.1.1.1</source-address>
       <source-interface>GigabitEthernet0/0/4</source-interface>
       <destination>2.2.2.2</destination>
       <nexthop>4.4.4.4</nexthop>
       <count>4</count>
       <frequency>39</frequency>
       <interval>5</interval>
       <packet-size>50</packet-size>
       <ttl>33</ttl>
       <tos>2</tos>
       <timeout>5</timeout>
       <description>description "Specifies the ping create description."</description>
      </ping-case>
     </case-input>
    </cases>
   </testcase-config>
   <vrrp xmlns="urn:huawei:params:xml:ns:yang:huawei-vrrp">
    <vrrp-instance>
     <interface-name>GigabitEthernet0/0/5</interface-name>
     <vrid>1</vrid>
     <vrrp4>
      <virtual-ip>5.5.5.5</virtual-ip> 
     </vrrp4>
     <vrrp-track-nqas>
      <vrrp-track-nqa>
       <admin-name>adminName</admin-name>
       <test-name>testName</test-name>
       <priority-value>20</priority-value>
      </vrrp-track-nqa>
     </vrrp-track-nqas>
    </vrrp-instance>
   </vrrp>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_54dab4150d2148d08fb9012b586071ba">  
 <ok/>  
</rpc-reply> 

Disabling VRRP from Implementing Active/Standby Switchover by Monitoring the NQA Instance Status

NOTE:

This function is supported in V300R003C10 and later versions.

This section provides a sample of disabling VRRP from implementing active/standby switchover by monitoring the NQA instance status.

Table 3-1536 Disabling VRRP from implementing active/standby switchover by monitoring the NQA instance status

Operation

XPATH

edit-config:remove

huawei-vrrp:vrrp/vrrp-instance/vrrp-track-nqas/vrrp-track-nqa

Data Requirements
Table 3-1537 Disabling VRRP from implementing active/standby switchover by monitoring the NQA instance status

Item

Data

Description

Source interface for the NQA test instance

GigabitEthernet0/0/4

Disassociate VRRP from the NQA instance adminName on GigabitEthernet0/0/5.

Management group name of the NQA test instance

adminName

Name of an NQA test instance

testName

NQA Test Instance Type

ping

Source IP address for the NQA test instance

1.1.1.1

Destination IP address for the NQA test instance

2.2.2.2

Next-hop IP address of the NQA test instance

4.4.4.4

Count of NQA test instances

4

Frequency of the NQA test instance

39

Interval at which NQA test requests are sent

5

Size of an NQA test instance packet

50

TTL value of packets for the NQA test instance

33

Service type of packets for the NQA test instance

2

Timeout period of a probe for the NQA test instance

5

Description for the NQA test instance

Specifies the ping create description.

VRRP interface

GigabitEthernet0/0/5

VRRP group ID

1

Virtual IP address of a VRRP group

5.5.5.5

Management group name of the NQA test instance

adminName

Name of an NQA test instance

testName

Value by which the priority reduces if the NQA test instance detects that the uplink is unavailable

20

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_54dab4150d2148d08fb9012b586071ba">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/4</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
    </interface>
   </interfaces>
   <testcase-config xmlns="urn:huawei:params:xml:ns:yang:huawei-nqa">
    <cases xc:operation="merge">
     <admin-name>adminName</admin-name>
     <test-name>testName</test-name>
     <type>ping</type>
     <case-input>
      <ping-case>
       <source-address>1.1.1.1</source-address>
       <source-interface>GigabitEthernet0/0/4</source-interface>
       <destination>2.2.2.2</destination>
       <nexthop>4.4.4.4</nexthop>
       <count>4</count>
       <frequency>39</frequency>
       <interval>5</interval>
       <packet-size>50</packet-size>
       <ttl>33</ttl>
       <tos>2</tos>
       <timeout>5</timeout>
       <description>description "Specifies the ping create description."</description>
      </ping-case>
     </case-input>
    </cases>
   </testcase-config>
   <vrrp xmlns="urn:huawei:params:xml:ns:yang:huawei-vrrp">
    <vrrp-instance>
     <interface-name>GigabitEthernet0/0/5</interface-name>
     <vrid>1</vrid>
     <vrrp4>
      <virtual-ip>5.5.5.5</virtual-ip> 
     </vrrp4>
     <vrrp-track-nqas>
      <vrrp-track-nqa xc:operation="remove">
       <admin-name>adminName</admin-name>
       <test-name>testName</test-name>
       <priority-value>20</priority-value>
      </vrrp-track-nqa>
     </vrrp-track-nqas>
    </vrrp-instance>
   </vrrp>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_54dab4150d2148d08fb9012b586071ba">  
 <ok/>  
</rpc-reply> 
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8210

Downloads: 69

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next