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).
EFM

EFM

Data Model

The data model files matching EFM are huawei-efm.yang and ietf-interfaces.yang.

Table 2-179  EFM data model

Object

Description

Value

Remarks

/huawei-efm/efm/enabled

Indicates whether EFM is enabled globally.

The value is of the Boolean type:
  • true: EFM is enabled globally.

  • false: EFM is disabled globally.

  • You can configure other EFM objects only after EFM is enabled globally.

  • Before disabling EFM globally, you need to delete all the configuration of EFM objects.

/ietf-interfaces/interfaces/interface/huawei-efm:efm/mode

Indicates the EFM working mode on an interface.

The value is of the enumerated type:
  • active: Active mode is configured on the interface.

  • passive: Passive mode is configured on the interface.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/enabled

Indicates whether EFM is enabled on an interface.

The value is of the Boolean type:
  • true: EFM is enabled on an interface.

  • false: EFM is disabled on an interface.

The following objects can be configured only after EFM is enabled on an interface. Similarly, delete the following objects before you disable EFM on an interface.
  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/ignore-request

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/critical-event-trigger

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/dying-gasp-trigger

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/link-fault-trigger

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/timeout-trigger

/ietf-interfaces/interfaces-state/interface/huawei-efm:efm/efm

Indicates that EFM session information is queried.

NA

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-code/enabled

Indicates whether the interface is enabled to report EFM errored codes.

The value is of the Boolean type:
  • true: The interface is enabled to report EFM errored codes.

  • false: The interface is disabled from reporting EFM errored codes.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-code/period

Indicates the period for detecting EFM errored codes on an interface.

The value is an integer that ranges from 1 to 60, in seconds.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-code/threshold

Indicates the threshold for detecting EFM errored codes on an interface.

The value is an integer that ranges from 0 to 65535. The value 0 is not recommended.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame/enabled

Indicates whether the interface is enabled to report EEM errored frames.

The value is of the Boolean type:
  • true: The interface is enabled to report EFM errored frames.

  • false: The interface is disabled from reporting EFM errored frames.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame/period

Indicates the period for detecting EFM errored frames on an interface.

The value is an integer that ranges from 1 to 60, in seconds.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame/threshold

Indicates the threshold for detecting EFM errored frames on an interface.

The value is an integer that ranges from 0 to 65535. The value 0 is not recommended.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame-second/enabled

Indicates whether the interface is enabled to report EEM errored frame seconds.

The value is of the Boolean type:
  • true: The interface is enabled to report EFM errored frame seconds.

  • false: The interface is disabled from reporting EFM errored frame seconds.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame-second/period

Indicates the period for detecting EFM errored frame seconds on an interface.

The value is an integer that ranges from 10 to 900, in seconds.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame-second/threshold

Indicates the threshold for detecting EFM errored frame seconds on an interface.

The value is an integer that ranges from 0 to 900. The value 0 is not recommended.

NA

/ietf-interfaces/interfaces-state/interface/huawei-efm:efm/errored-code-statistics

Indicates that statistics about local link errored code events are queried.

NA

NA

/ietf-interfaces/interfaces-state/interface/huawei-efm:efm/errored-frame-statistics

Indicates that statistics about local link errored frame events are queried.

NA

NA

/ietf-interfaces/interfaces-state/interface/huawei-efm:efm/errored-frame-period-statistics

Indicates that statistics about local link errored frame period events are queried.

NA

NA

/ietf-interfaces/interfaces-state/interface/huawei-efm:efm/errored-frame-seconds-statistics

Indicates that statistics about local link errored frame second events are queried.

NA

NA

/huawei-efm/remote-loopback/operate-type

Indicates that the interface initiates or terminates EFM remote loopback.

The value is of the enumerated type:
  • start: EFM remote loopback is initiated.
  • stop EFM remote loopback is stopped.

NA

/huawei-efm/remote-loopback/timeout

Indicates the timeout interval of an EFM remote loopback.

The value is an integer that ranges from 0 to 1000, in minutes.

NA

/huawei-efm/remote-loopback/interface

Indicates the interface that initiates or terminates EFM remote loopback.

The value must be set according to the device configuration.

NA

/huawei-efm/test-packet/packet-number

Indicates the number of EFM remote loopback packets to be sent.

The value is an integer that ranges from 1 to 65535.

NA

/huawei-efm/test-packet/packet-size

Indicates the length of an EFM remote loopback packet.

The value is an integer that ranges from 64 to 1518, in bytes.

NA

/huawei-efm/test-packet/interface

Indicates the outbound interface of EFM remote loopback packets.

The value must be set according to the device configuration.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/ignore-request

Indicates that the interface is configured to ignore remote loopback requests.

The value is of the Boolean type:
  • true: The interface is configured to ignore remote loopback requests.

  • false: The interface is configured to process remote loopback requests.

NA

/huawei-efm/efm-statistics/test-packet-statistics

Indicates that statistics about sent EFM remote loopback packets are queried.

NA

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/critical-event-trigger

Indicates whether a non-specific major event is associated with an interface.

The value is of the Boolean type:
  • true: A non-specific major event is associated with an interface.

  • false: A non-specific major event is not associated with an interface.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/dying-gasp-trigger

Indicates whether a dying gasp event is associated with an interface.

The value is of the Boolean type:
  • true: A dying gasp event is associated with an interface.

  • false: A dying gasp event is not associated with an interface.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/link-fault-trigger

Indicates whether a physical link fault event is associated with an interface.

The value is of the Boolean type:
  • true: A physical link fault event is associated with an interface.

  • false: A physical link fault event is not associated with an interface.

NA

/ietf-interfaces/interfaces/interface/huawei-efm:efm/timeout-trigger

Indicates whether an EFM packet receiving timeout event is associated with an interface.

The value is of the Boolean type:
  • true: An EFM packet receiving timeout event is associated with an interface.

  • false: An EFM packet receiving timeout event is not associated with an interface.

NA

/huawei-efm/oam-mgr/oam-bind-efm/ingress-port

Indicates the name of the EFM-enabled interface.

The value must be set according to the device configuration.

NA

/huawei-efm/oam-mgr/oam-bind-efm/direction

Indicates the direction where faults are reported between EFM and an interface.

The value is of the enumerated type:
  • port-to-efm: An interface is configured to report faults to EFM.
  • efm-to-port: EFM is configured to report faults to an interface.

NA

/huawei-efm/oam-mgr/oam-bind-efm/egress-port

Indicates the name of the interface bound to EFM.

The value must be set according to the device configuration.

NA

Enabling EFM Globally

This section provides a sample of enabling EFM globally using the edit-config method.

Table 2-180  Enabling EFM globally

Operation

XPATH

edit-config

/huawei-efm/efm/enabled

Data Requirements

Item

Data

Description

Global EFM status

true

Enable EFM globally.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="27" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
        <huawei-efm:enabled>true</huawei-efm:enabled>
      </huawei-efm:efm>
    </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="27">
  <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="27">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Configuring an EFM Working Mode on an Interface

This section provides a sample of configuring an EFM working mode on an interface using the edit-config method.

Table 2-181  Configuring an EFM working mode on an interface

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/mode

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface where an EFM working mode needs to be configured.

EFM working mode

passive

Configure EFM on the interface to work in passive mode.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="8" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:mode>passive</huawei-efm:mode>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="8">
  <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="8">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>Service process failed.</error-message>
    <error-info>Error on node /ietf-interfaces:interfaces/interface[name="GigabitEthernet0/0/1"]/huawei-efm:efm/mode</error-info>
  </rpc-error>
</rpc-reply>

Enabling EFM on an Interface

This section provides a sample of enabling EFM on an interface using the edit-config method.

Table 2-182  Enabling EFM on an interface

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/enabled

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface where EFM needs to be enabled.

EFM status on the interface

true

Enable EFM on an interface.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="64" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:enabled>true</huawei-efm:enabled>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="64">
  <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="64">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Checking EFM Session Information

This section provides a sample of checking EFM session information using the get method.

Table 2-183  Checking EFM session information

Operation

XPATH

get

/ietf-interfaces/interfaces-state/interface/huawei-efm:efm/efm

Data Requirements

None

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="28" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name/>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm"/>
        </if:interface>
      </if:interfaces-state>
    </filter>
  </get>
</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="28">
  <data>
    <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
      <interface>
        <name>GigabitEthernet0/0/1</name>
        <efm xmlns="urn:huawei:params:xml:ns:yang:huawei-efm">
          <port-efm-status>detect</port-efm-status>
          <time-out>0</time-out>
          <errored-code-statistics>
            <errors>0</errors>
            <error-running-total>0</error-running-total>
            <event-running-total>0</event-running-total>
          </errored-code-statistics>
          <errored-frame-statistics>
            <errors>0</errors>
            <error-running-total>0</error-running-total>
            <event-running-total>0</event-running-total>
          </errored-frame-statistics>
          <errored-frame-period-statistics>
            <errors>0</errors>
            <error-running-total>0</error-running-total>
            <event-running-total>0</event-running-total>
          </errored-frame-period-statistics>
          <errored-frame-seconds-statistics>
            <errors>0</errors>
            <error-running-total>0</error-running-total>
            <event-running-total>0</event-running-total>
          </errored-frame-seconds-statistics>
        </efm>
      </interface>
      <interface>
        <name>NULL0</name>
      </interface>
      <interface>
        <name>MEth0/0/1</name>
      </interface>
      <interface>
        <name>Vlanif1</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/2</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/3</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/4</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/5</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/6</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/7</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/8</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/9</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/10</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/11</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/12</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/13</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/14</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/15</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/16</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/17</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/18</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/19</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/20</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/21</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/22</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/23</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/24</name>
      </interface>
    </interfaces-state>
  </data>
</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="28">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Configuring an Interface to Report EFM Errored Codes

This section provides a sample of configuring an interface to report EFM errored codes using the edit-config method.

Table 2-184  Configuring an interface to report EFM errored codes

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-code/enabled

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface that needs to be configured to report EFM errored codes.

Whether the interface is configured to report EFM errored codes

true

Configure an interface to report EFM errored codes.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="24" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-code>
              <huawei-efm:enabled>true</huawei-efm:enabled>
            </huawei-efm:error-code>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="24">
  <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="24">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Setting the Period for Detecting EFM Errored Codes

This section provides a sample of setting the period for detecting EFM errored codes on an interface using the edit-config method.

Table 2-185  Setting the period for detecting EFM errored codes

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-code/period

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface where the period for detecting EFM errored codes needs to be configured.

Period for detecting EFM errored codes

10

Set the period for detecting EFM errored codes to 10s.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="25" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-code>
              <huawei-efm:period>10</huawei-efm:period>
            </huawei-efm:error-code>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="25">
  <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="25">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Setting the Threshold for Detecting EFM Errored Codes

This section provides a sample of setting the threshold for detecting EFM errored codes on an interface using the edit-config method.

Table 2-186  Setting the threshold for detecting EFM errored codes

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-code/threshold

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface where the threshold for detecting EFM errored codes needs to be configured.

Threshold for detecting EFM errored codes

10

Set the threshold for detecting EFM errored codes to 10.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="26" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-code>
              <huawei-efm:threshold>10</huawei-efm:threshold>
            </huawei-efm:error-code>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="26">
  <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="26">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Configuring an Interface to Report EFM Errored Frames

This section provides a sample of configuring an interface to report EFM errored frames using the edit-config method.

Table 2-187  Configuring an interface to report EFM errored frames

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame/enabled

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface that needs to be configured to report EFM errored frames.

Whether the interface is configured to report EFM errored frames

true

Configure an interface to report EFM errored frames.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="19" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-frame>
              <huawei-efm:enabled>true</huawei-efm:enabled>
            </huawei-efm:error-frame>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="19">
  <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="19">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Setting the Period for Detecting EFM Errored Frames

This section provides a sample of setting the period for detecting EFM errored frames on an interface using the edit-config method.

Table 2-188  Setting the period for detecting EFM errored frames

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame/period

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface where the period for detecting EFM errored frames needs to be configured.

Period for detecting EFM errored frames

10

Set the period for detecting EFM errored frames to 10s.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="20" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-frame>
              <huawei-efm:period>10</huawei-efm:period>
            </huawei-efm:error-frame>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="20">
  <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="20">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Setting the Threshold for Detecting EFM Errored Frames

This section provides a sample of setting the threshold for detecting EFM errored frames on an interface using the edit-config method.

Table 2-189  Setting the threshold for detecting EFM errored frames

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame/threshold

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface where the threshold for detecting EFM errored frames needs to be configured.

Threshold for detecting EFM errored frames

10

Set the threshold for detecting EFM errored frames to 10.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="21" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-frame>
              <huawei-efm:threshold>10</huawei-efm:threshold>
            </huawei-efm:error-frame>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="21">
  <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="21">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Configuring an Interface to Report EFM Errored Frame Seconds

This section provides a sample of configuring an interface to report EFM errored frame seconds using the edit-config method.

Table 2-190  Configuring an interface to report EFM errored frame seconds

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame-second/enabled

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface that needs to be configured to report EFM errored frame seconds.

Whether the interface is configured to report EFM errored frame seconds

true

Configure an interface to report EFM errored frame seconds.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="17" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-frame-second>
              <huawei-efm:enabled>true</huawei-efm:enabled>
            </huawei-efm:error-frame-second>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="17">
  <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="17">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Setting the Period for Detecting EFM Errored Frame Seconds

This section provides a sample of setting the period for detecting EFM errored frame seconds on an interface using the edit-config method.

Table 2-191  Setting the period for detecting EFM errored frame seconds

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame-second/period

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface where the period for detecting EFM errored frame seconds needs to be configured.

Period for detecting EFM errored frame seconds

10

Set the period for detecting EFM errored frame seconds to 10s.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="23" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-frame-second>
              <huawei-efm:period>10</huawei-efm:period>
            </huawei-efm:error-frame-second>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="23">
  <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="23">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Setting the Threshold for Detecting EFM Errored Frame Seconds

This section provides a sample of setting the threshold for detecting EFM errored frame seconds on an interface using the edit-config method.

Table 2-192  Setting the threshold for detecting EFM errored frame seconds

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/error-frame-second/threshold

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface where the threshold for detecting EFM errored frame seconds needs to be configured.

Threshold for detecting EFM errored frame seconds

10

Set the threshold for detecting EFM errored frame seconds to 10.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="22" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:error-frame-second>
              <huawei-efm:threshold>10</huawei-efm:threshold>
            </huawei-efm:error-frame-second>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="22">
  <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="22">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Checking Statistics About Local Link Events

This section provides a sample of checking statistics about local link events using the get method.

Table 2-193  Checking statistics about local link events

Operation

XPATH

get

  • /ietf-interfaces/interfaces-state/interface/huawei-efm:efm/errored-code-statistics

  • /ietf-interfaces/interfaces-state/interface/huawei-efm:efm/errored-frame-statistics

  • /ietf-interfaces/interfaces-state/interface/huawei-efm:efm/errored-frame-period-statistics

  • /ietf-interfaces/interfaces-state/interface/huawei-efm:efm/errored-frame-seconds-statistics

Data Requirements

None

Request Example (Checking EFM Errored Code Events)

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="30" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name/>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:errored-code-statistics/>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces-state>
    </filter>
  </get>
</rpc>

Response Example (Checking EFM Errored Code Events)

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="30">
  <data>
    <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
      <interface>
        <name>GigabitEthernet0/0/1</name>
        <efm xmlns="urn:huawei:params:xml:ns:yang:huawei-efm">
          <errored-code-statistics>
            <errors>0</errors>
            <error-running-total>0</error-running-total>
            <event-running-total>0</event-running-total>
          </errored-code-statistics>
        </efm>
      </interface>
      <interface>
        <name>NULL0</name>
      </interface>
      <interface>
        <name>MEth0/0/1</name>
      </interface>
      <interface>
        <name>Vlanif1</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/2</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/3</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/4</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/5</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/6</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/7</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/8</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/9</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/10</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/11</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/12</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/13</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/14</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/15</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/16</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/17</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/18</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/19</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/20</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/21</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/22</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/23</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/24</name>
      </interface>
    </interfaces-state>
  </data>
</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="30">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Request Example (Checking EFM Errored Frame Events)

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="31" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name/>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:errored-frame-statistics/>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces-state>
    </filter>
  </get>
</rpc>

Response Example (Checking EFM Errored Frame Events)

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="31">
  <data>
    <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
      <interface>
        <name>GigabitEthernet0/0/1</name>
        <efm xmlns="urn:huawei:params:xml:ns:yang:huawei-efm">
          <errored-frame-statistics>
            <errors>0</errors>
            <error-running-total>0</error-running-total>
            <event-running-total>0</event-running-total>
          </errored-frame-statistics>
        </efm>
      </interface>
      <interface>
        <name>NULL0</name>
      </interface>
      <interface>
        <name>MEth0/0/1</name>
      </interface>
      <interface>
        <name>Vlanif1</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/2</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/3</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/4</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/5</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/6</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/7</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/8</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/9</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/10</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/11</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/12</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/13</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/14</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/15</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/16</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/17</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/18</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/19</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/20</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/21</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/22</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/23</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/24</name>
      </interface>
    </interfaces-state>
  </data>
</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="31">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Request Example (Checking EFM Errored Frame Period Events)

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="32" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name/>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:errored-frame-period-statistics/>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces-state>
    </filter>
  </get>
</rpc>

Response Example (Checking EFM Errored Frame Period Events)

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="32">
  <data>
    <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
      <interface>
        <name>GigabitEthernet0/0/1</name>
        <efm xmlns="urn:huawei:params:xml:ns:yang:huawei-efm">
          <errored-frame-period-statistics>
            <errors>0</errors>
            <error-running-total>0</error-running-total>
            <event-running-total>0</event-running-total>
          </errored-frame-period-statistics>
        </efm>
      </interface>
      <interface>
        <name>NULL0</name>
      </interface>
      <interface>
        <name>MEth0/0/1</name>
      </interface>
      <interface>
        <name>Vlanif1</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/2</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/3</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/4</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/5</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/6</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/7</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/8</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/9</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/10</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/11</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/12</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/13</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/14</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/15</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/16</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/17</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/18</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/19</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/20</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/21</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/22</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/23</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/24</name>
      </interface>
    </interfaces-state>
  </data>
</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="32">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Request Example (Checking EFM Errored Frame Second Events)

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="33" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name/>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:errored-frame-seconds-statistics/>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces-state>
    </filter>
  </get>
</rpc>

Response Example (Checking EFM Errored Frame Second Events)

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="33">
  <data>
    <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
      <interface>
        <name>GigabitEthernet0/0/1</name>
        <efm xmlns="urn:huawei:params:xml:ns:yang:huawei-efm">
          <errored-frame-seconds-statistics>
            <errors>0</errors>
            <error-running-total>0</error-running-total>
            <event-running-total>0</event-running-total>
          </errored-frame-seconds-statistics>
        </efm>
      </interface>
      <interface>
        <name>NULL0</name>
      </interface>
      <interface>
        <name>MEth0/0/1</name>
      </interface>
      <interface>
        <name>Vlanif1</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/2</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/3</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/4</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/5</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/6</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/7</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/8</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/9</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/10</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/11</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/12</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/13</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/14</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/15</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/16</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/17</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/18</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/19</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/20</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/21</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/22</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/23</name>
      </interface>
      <interface>
        <name>GigabitEthernet0/0/24</name>
      </interface>
    </interfaces-state>
  </data>
</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="33">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Configuring EFM Remote Loopback

This section provides a sample of configuring EFM remote loopback using the rpc method.

Table 2-194  Configuring EFM remote loopback

Operation

XPATH

rpc

  • /huawei-efm/remote-loopback/operate-type

  • /huawei-efm/remote-loopback/timeout

  • /huawei-efm/remote-loopback/interface

Data Requirements

Item

Data

Description

EFM remote loopback

start

Initiate EFM remote loopback.

Timeout interval for EFM remote loopback

0

Set the timeout interval for EFM remote loopback to 0.

Interface name

GigabitEthernet0/0/1

Specify the interface that needs to be configured with EFM remote loopback.

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="53">
  <huawei-efm:remote-loopback xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
    <huawei-efm:operate-type>start</huawei-efm:operate-type>
    <huawei-efm:timeout>0</huawei-efm:timeout>
    <huawei-efm:interface>GigabitEthernet0/0/1</huawei-efm:interface>
  </huawei-efm:remote-loopback>
</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="53">
  <ok/>
</rpc-reply>

Sample of failed response

</rpc-reply>
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="53">
  <rpc-error>
    <error-message>valid user-defined rpc fail.</error-message>
  </rpc-error>
</rpc-reply>

Configuring an Interface to Send EFM Remote Loopback Packets

This section provides a sample of configuring an interface to send EFM remote loopback packets using the rpc method.

Table 2-195  Configuring an interface to send EFM remote loopback packets

Operation

XPATH

rpc

  • /huawei-efm/test-packet/interface

  • /huawei-efm/test-packet/packet-number

  • /huawei-efm/test-packet/packet-size

Data Requirements

Item

Data

Description

Outbound interface that sends EFM remote loopback packets

GigabitEthernet0/0/1

Configure GigabitEthernet0/0/1 to send EFM remote loopback packets.

Number of sent EFM remote loopback packets

10

Set the number of EFM remote loopback packets to 10.

Size of sent EFM remote loopback packets

100

Set the size of EFM remote loopback packets to 100 bytes.

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="53">
  <huawei-efm:test-packet xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
    <huawei-efm:interface>GigabitEthernet0/0/1</huawei-efm:interface>
    <huawei-efm:packet-number>10</huawei-efm:packet-number>
    <huawei-efm:packet-size>100</huawei-efm:packet-size>
  </huawei-efm:test-packet>
</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="53">
  <ok/>
</rpc-reply>

Sample of failed response

</rpc-reply>
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="53">
  <rpc-error>
    <error-message>valid user-defined rpc fail.</error-message>
  </rpc-error>
</rpc-reply>

Configuring an Interface to Ignore EFM Remote Loopback Requests

This section provides a sample of configuring an interface to ignore EFM remote loopback requests using the edit-config method.

Table 2-196  Configuring an interface to ignore EFM remote loopback requests

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/ignore-request

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface that needs to ignore EFM remote loopback requests.

Whether the interface is configured to ignore EFM remote loopback requests

true

Configure an interface to ignore EFM remote loopback requests.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="17" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:ignore-request>true</huawei-efm:ignore-request>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="17">
  <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="17">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Checking Statistics About Sent EFM Remote Loopback Packets

This section provides a sample of checking statistics about EFM remote loopback packets using the get method.

Table 2-197  Checking statistics about EFM remote loopback packets

Operation

XPATH

get

/huawei-efm/efm-statistics/test-packet-statistics

Data Requirements

None

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="34" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <huawei-efm:efm-statistics xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
        <huawei-efm:test-packet-statistics/>
      </huawei-efm:efm-statistics>
    </filter>
  </get>
</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="34">
  <data>
    <efm-statistics xmlns="urn:huawei:params:xml:ns:yang:huawei-efm">
      <test-packet-statistics>
        <send-packets-value>5</send-packets-value>
        <receive-packets-value>5</receive-packets-value>
        <lost-packets-value>0</lost-packets-value>
        <send-bytes-value>320</send-bytes-value>
        <receive-bytes-value>320</receive-bytes-value>
        <lost-bytes-value>0</lost-bytes-value>
        <start-time>06-20-2017 13:46:40 UTC+00:00</start-time>
        <end-time>06-20-2017 13:46:46 UTC+00:00</end-time>
      </test-packet-statistics>
    </efm-statistics>
  </data>
</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="34">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Associating a Non-specific Major Event with an Interface

This section provides a sample of associating a non-specific major event with an interface using the edit-config method.

Table 2-198  Associating a non-specific major event with an interface

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/critical-event-trigger

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface to be associated with a non-specific major event.

Whether the interface is associated with a non-specific major event

true

Associate a non-specific major event with an interface.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="33" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:critical-event-trigger>true</huawei-efm:critical-event-trigger>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="33">
  <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="33">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Associating a Dying Gasp Event with an Interface

This section provides a sample of associating a dying gasp event with an interface using the edit-config method.

Table 2-199  Associating a dying gasp event with an interface

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/dying-gasp-trigger

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface to be associated with a dying gasp event.

Whether the interface is associated with a dying gasp event

true

Associate a dying gasp event with an interface.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="7" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:dying-gasp-trigger>true</huawei-efm:dying-gasp-trigger>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="7">
  <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="7">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Associating a Physical Link Fault Event with an Interface

This section provides a sample of associating a physical link fault event with an interface using the edit-config method.

Table 2-200  Associating a physical link fault event with an interface

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/link-fault-trigger

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface to be associated with a physical link fault event.

Whether the interface is associated with a physical link fault event

true

Associate a physical link fault event with an interface.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="9" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:link-fault-trigger>true</huawei-efm:link-fault-trigger>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Associating an EFM Packet Receiving Timeout Event with an Interface

This section provides a sample of associating an EFM packet receiving timeout event with an interface using the edit-config method.

Table 2-201  Associating an EFM packet receiving timeout event with an interface

Operation

XPATH

edit-config

  • /ietf-interfaces/interfaces/interface/name

  • /ietf-interfaces/interfaces/interface/huawei-efm:efm/timeout-trigger

Data Requirements

Item

Data

Description

Interface name

GigabitEthernet0/0/1

Specify the interface to be associated with an EFM packet receiving timeout event.

Whether the interface is associated with an EFM packet receiving timeout event

true

Associate an EFM packet receiving timeout event with an interface.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="11" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
            <huawei-efm:timeout-trigger>true</huawei-efm:timeout-trigger>
          </huawei-efm:efm>
        </if:interface>
      </if:interfaces>
    </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="11">
  <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="11">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Configuring EFM Association

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

Table 2-202  Configuring EFM association

Operation

XPATH

edit-config

  • /huawei-efm/oam-mgr/oam-bind-efm/ingress-port

  • /huawei-efm/oam-mgr/oam-bind-efm/direction

  • /huawei-efm/oam-mgr/oam-bind-efm/egress-port

Data Requirements

Item

Data

Description

Name of the EFM-enabled interface

GigabitEthernet0/0/1

Specify the interface where EFM needs to be enabled.

Direction where faults are reported between EFM and an interface

efm-to-port

Configure EFM to report faults to an interface.

Name of the interface bound to EFM

GigabitEthernet0/0/2

Specify the interface to be bound to EFM.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="40" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <huawei-efm:efm xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
        <huawei-efm:enabled>true</huawei-efm:enabled>
      </huawei-efm:efm>
      <huawei-efm:oam-mgr xmlns:huawei-efm="urn:huawei:params:xml:ns:yang:huawei-efm">
        <huawei-efm:oam-bind-efm>
          <huawei-efm:ingress-port>GigabitEthernet0/0/1</huawei-efm:ingress-port>
          <huawei-efm:direction>efm-to-port</huawei-efm:direction>
          <huawei-efm:egress-port>GigabitEthernet0/0/2</huawei-efm:egress-port>
        </huawei-efm:oam-bind-efm>
      </huawei-efm:oam-mgr>
    </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="40">
  <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="40">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>Service process failed.</error-message>
    <error-info>Error on node /huawei-efm:efm/oam-mgr/oam-bind-efm[ingress-port="GigabitEthernet0/0/1",direction="efm_to_port"]</error-info>
  </rpc-error>
</rpc-reply>
Translation
Download
Updated: 2019-10-18

Document ID: EDOC1000178028

Views: 5102

Downloads: 0

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