This section describes how to configure the MTU for an interface using the edit-config:merge method.
Operation |
XPATH |
|---|---|
edit-config:merge |
/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/mtu |
Item |
Data |
Description |
|---|---|---|
MTU of an interface |
1200 |
Indicates that the MTU of the interface is 1200 bytes. |
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="5" 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>Vlanif101</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>1200</ip:mtu>
</ip:ipv4>
</if:interface>
</if:interfaces>
</config>
</edit-config>
</rpc>
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="5"> <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="5">
<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="Vlanif101"]/ietf-ip:ipv4/mtu</error-info>
</rpc-error>
</rpc-reply>