This section provides a sample of configuring a tunnel policy using the edit-config:merge method.
Operation |
XPATH |
|---|---|
edit-config:merge |
|
Item |
Data |
Description |
|---|---|---|
Tunnel policy name |
jk |
Set the tunnel policy name. |
Tunnel policy type |
tnlBinding |
Set the tunnel policy type. |
Destination address of the tunnel |
nexthopIPaddr |
Set the destination address of the tunnel. |
Tunnel name |
Tunnel3 |
Set the tunnel name. |
<?xml version="1.0" encoding="utf-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3">
<edit-config>
<target>
<running/>
</target>
<config>
<tnlm:tnlm xmlns:tnlm="http://www.huawei.com/netconf/vrp/huawei-tnlm">
<tnlm:tunnelPolicys>
<tnlm:tunnelPolicy>
<tnlm:tnlPolicyName>jk</tnlm:tnlPolicyName>
<tnlm:tnlPolicyType>tnlBinding</tnlm:tnlPolicyType>
<tnlm:tpNexthops>
<tnlm:tpNexthop>
<tnlm:nexthopIPaddr>2.2.2.3</tnlm:nexthopIPaddr>
<tnlm:tpTunnels>
<tnlm:tpTunnel>
<tnlm:tunnelName>Tunnel3</tnlm:tunnelName>
</tnlm:tpTunnel>
</tnlm:tpTunnels>
</tnlm:tpNexthop>
</tnlm:tpNexthops>
</tnlm:tunnelPolicy>
</tnlm:tunnelPolicys>
</tnlm:tnlm>
</config>
</edit-config>
</rpc>
##### Ok Reply or Operation Successful ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <ok/> </rpc-reply>
<?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-app-tag>-1</error-app-tag>
<error-message>The configuration/operation does not support.</error-message>
<error-info>Error on node /huawei-tnlm:tnlm/tunnelPolicys/tunnelPolicy[tnlPolicyName="jk"]/tpNexthops/tpNexthop[nexthopIPaddr="2.2.2.3"]</error-info>
</rpc-error>
</rpc-reply>