< Home

Configuring the MTU for IPv4 Traffic on an Interface

This section provides a sample of configuring the MTU for IPv4 traffic on an interface using the edit-config:create method.

Table 1 Configuring the MTU for IPv4 traffic on an interface

Operation

XPATH

edit-config:create

/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/mtu

Data Requirements

Table 2 Configuring the MTU for IPv4 traffic on an interface

Item

Data

Description

Interface name

Vlanif10

Set the interface name.

MTU for IPv4 traffic on an interface

6000

Set the MTU for IPv4 traffic on an interface to 6000 bytes.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="3" 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>Vlanif10</if:name>
          <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
          <ip:ipv4 xmlns:ip="urn:ietf:params:xml:ns:yang:ietf-ip">
            <ip:mtu>6000</ip:mtu>
          </ip:ipv4>
        </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="3"> 
  <ok/> 
</rpc-reply>

Sample of failed response

##### Error Reply or Operation Failed #####
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>Wrong parameter.</error-message>
    <error-info>Error on node /ietf-interfaces:interfaces/interface[name="Vlanif10"]/ietf-ip:ipv4/mtu</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >