This section provides a sample of configuring the IPv6 address and MTU of an interface using the edit-config:merge method.
Operation |
XPATH |
|---|---|
edit-config:merge |
/ietf-interfaces:interfaces/interface/ietf-ip:ipv6 |
Item |
Data |
Description |
|---|---|---|
Interface name |
Vlanif100 |
Configure VLANIF 100. |
Interface type |
iana-if-type:propVirtual |
|
IPv6 function on an interface |
true |
Enable the IPv6 function on the interface. |
IPv6 MTU of an interface |
1280 |
Set the IPv6 MTU of the interface to 1280 bytes. |
IPv6 address of an interface |
fc00::1 |
Set the IPv6 address of the interface to fc00::1. |
Prefix length of an IPv6 address |
64 |
Set the prefix length of the IPv6 address to 64. |
Number of times neighbor solicitation (NS) packets are sent during duplicate address detection (DAD) |
20 |
Set the number of times NS packets sent by the switch during DAD to 20. |
<?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>Vlanif100</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
<ip:ipv6 xmlns:ip="urn:ietf:params:xml:ns:yang:ietf-ip">
<ip:enabled>true</ip:enabled>
<ip:mtu>1280</ip:mtu>
<ip:address>
<ip:ip>fc00::1</ip:ip>
<ip:prefix-length>64</ip:prefix-length>
</ip:address>
<ip:dup-addr-detect-transmits>20</ip:dup-addr-detect-transmits>
</ip:ipv6>
</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="Vlanif100"]/ietf-ip:ipv6/mtu</error-info>
</rpc-error>
</rpc-reply>