< Home

Configuring the Duplex Mode

This section describes how to configure the duplex mode using the rpc method.

Table 1 Configuring the duplex mode

Operation

XPATH

rpc

/ietf-interfaces:interfaces/interface/hw-ethernet:physical-config/duplex

Data requirement

Table 2 Configuring the duplex mode

Item

Data

Description

Duplex mode

full

Indicates that the interface works in full duplex mode.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="15" 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/2</if:name>
          <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
          <hw-ethernet:physical-config xmlns:hw-ethernet="urn:huawei:params:xml:ns:yang:huawei-ethernet">
            <hw-ethernet:duplex>full</hw-ethernet:duplex>
          </hw-ethernet:physical-config>
        </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="15">
  <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="15">
  <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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >