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

S600-E V200R011C10 NETCONF YANG API Reference

This document describes the NETCONF API functions supported by the switch, including the data model and samples.
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).
Tracert

Tracert

This section describes the configuration model of the tracert command and provides examples of XML packets.

Data Model

The configuration model file matching the tracert command is huawei-traceroute.yang.

Table 2-254  Configuration objects of the tracert command

Object

Description

Value

Remarks

/huawei-traceroute:tracert/test-name

Indicates the instance name of the tracert command.

The value is a string of 1 to 32 case-sensitive characters.

An instance uniquely identifies one tracert command. Since the tracert command is executed in asynchronous mode, this object is used by the controller to associate the tracert command with a notification message.

/huawei-traceroute:tracert/ipv4-tracert/destination

Indicates the domain name or IPv4 address of a destination host.

  • If the value is a domain name, it is a string of 1 to 255 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.
  • If the value is an IPv4 address, it is in dotted decimal notation.

N/A

/huawei-traceroute:tracert/ipv4-tracert/source-ip-address

Indicates the source IPv4 address of ICMP request packets.

The value is in dotted decimal notation. It must be an existing IPv4 address on the switch.

N/A

/huawei-traceroute:tracert/ipv4-tracert/first-ttl

Indicates the initial TTL value of ICMP request packets.

The value is an integer that ranges from 1 to 255. The default value is 1.

N/A

/huawei-traceroute:tracert/ipv4-tracert/max-ttl

Indicates the maximum TTL value of ICMP request packets.

The value is an integer that ranges from 1 to 255. The default value is 30.

N/A

/huawei-traceroute:tracert/ipv4-tracert/probe-count

Indicates the number of ICMP request packets to be sent each time.

The value is an integer that ranges from 1 to 5. The default value is 3.

N/A

/huawei-traceroute:tracert/ipv4-tracert/timeout

Indicates the timeout interval for ICMP response packets.

The value is an integer that ranges from 0 to 10000, in milliseconds. The default value is 2000.

N/A

/huawei-traceroute:tracert/ipv4-tracert/vpn-instance-name

Indicates the name of a VPN instance to which a destination host belongs.

The value is a string of 1 to 31 characters. It must be an existing VPN instance name on the switch.

N/A

/huawei-traceroute:tracert/ipv4-tracert/udp-port

Indicates the UDP port number of a destination host.

The value is an integer that ranges from 0 to 65535. The default value is 33434.

N/A

/huawei-traceroute:tracert/ipv4-tracert/packet-size

Indicates the length of ICMP request packets excluding the IPv4 and ICMP headers.

The value is an integer that ranges from 12 to 9600, in bytes. The default value is 12.

N/A

/huawei-traceroute:tracert/ipv6-tracert/destination

Indicates the domain name or IPv6 address of a destination host.

  • If the value is a domain name, it is a string of 1 to 255 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.
  • If the value is an IPv6 address, it contains 128 bits, which are divided into eight groups. Each group contains four hexadecimal digits. The value is in the format of X:X:X:X:X:X:X:X.

N/A

/huawei-traceroute:tracert/ipv6-tracert/udp-port Indicates the UDP port number of a destination host. The value is an integer that ranges from 1 to 65535. The default value is 33434.

N/A

/huawei-traceroute:tracert/ipv6-tracert/packet-size Indicates the length of ICMPv6 request packets excluding the IPv6 and ICMPv6 headers. The value is an integer that ranges from 20 to 9600, in bytes. The default value is 20.

N/A

NOTE:

Since running the tracert command takes time, the switch returns an RPC response first after receiving the RPC request for running the tracert command sent by the controller. After running the tracert command and obtaining the command output, the switch notifies the controller of the execution result by a notification message.

Table 2-255  Notification message

Item

Description

test-name

Indicates the instance name of the tracert command, which matches the /huawei-traceroute:tracert/test-name object.

destination

Indicates the domain name, IPv4 address, or IPv6 address of a destination host.

max-hops

Indicates the maximum number of hops for sending ICMP request packets.

packet-size Indicates the length of ICMP request packets.
hop-index Indicates the sequence number of the next hop.
hop-address Indicates the IPv4 or IPv6 address of the next hop.
probe-index Indicates the index of ICMP request packets.
result Indicates test results.
delta-time Indicates the test duration, in milliseconds.
complete
Indicates whether the notification message is the last one:
  • true: The notification message is the last one.
  • false: The notification message is not the last one.

Running the tracert Command

This section describes how to run the tracert command using the rpc method.

Table 2-256  Running the tracert command

Operation

XPATH

rpc

  • /huawei-traceroute:tracert/test-name
  • /huawei-traceroute:tracert/ipv4-tracert/destination

Data Requirements

Item

Data

Description

Instance name of the tracert command

aabb

Set the instance name of the tracert command to aabb.

Destination host

192.168.20.1

Set the IPv4 address of the destination host to 192.168.20.1.

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <hw-tracert:tracert xmlns:hw-tracert="urn:huawei:params:xml:ns:yang:huawei-traceroute">
    <hw-tracert:test-name>aabb</hw-tracert:test-name>
    <hw-tracert:ipv4-tracert>
      <hw-tracert:destination>192.168.20.1</hw-tracert:destination>
    </hw-tracert:ipv4-tracert>
  </hw-tracert:tracert>
</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="1">
  <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="1">
  <error/>
</rpc-reply>

Notification Reporting Result

# The switch reports the execution result of the tracert command to the controller through a notification message.

<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
  <eventTime>2017-06-12T16:54:03Z</eventTime>
  <tracert-case-result xmlns="urn:huawei:params:xml:ns:yang:huawei-traceroute">
    <test-name>aabb</test-name>
    <destination>192.168.20.1</destination>
    <max-hops>30</max-hops>
    <packet-size>12</packet-size>
    <hops>
      <hop-index>1</hop-index>
      <hop-address>192.168.20.2</hop-address>
      <probes>
        <probe-index>1</probe-index>
          <result>succeed</result>
          <delta-time>5</delta-time>
      </probes>
      <probes>
        <probe-index>2</probe-index>
        <result>succeed</result>
        <delta-time>4</delta-time>
      </probes>
      <probes>
        <probe-index>3</probe-index>
        <result>succeed</result>
        <delta-time>4</delta-time>
      </probes>
    </hops>
    <complete>true</complete>
  </tracert-case-result>
</notification>
Translation
Download
Updated: 2019-09-23

Document ID: EDOC1000178028

Views: 4538

Downloads: 0

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