This section describes how to configure a VXLAN tunnel using the rpc method.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-vxlan/vxlan |
Item |
Data |
Description |
---|---|---|
NVE interface number |
1 |
Create an NVE interface numbered 1. |
IP address of the source VTEP |
10.2.2.2 |
Set the IP address of the source VTEP to 10.2.2.2. |
VNI ID |
10 |
Set the VNI ID to 10. |
IP address of the source VTEP |
10.3.3.3 |
Set the IP address of the destination VTEP to 10.3.3.3. |
BD ID |
10 |
Set the associated BD ID to 10. |
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-vxlan:vxlan xmlns:hw-vxlan="urn:huawei:params:xml:ns:yang:huawei-vxlan" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge"> <hw-vxlan:nve> <hw-vxlan:id>1</hw-vxlan:id> <hw-vxlan:local-address>10.2.2.2</hw-vxlan:local-address> <hw-vxlan:vni-config> <hw-vxlan:vni>10</hw-vxlan:vni> <hw-vxlan:peer-address>10.3.3.3</hw-vxlan:peer-address> <hw-vxlan:bdid>10</hw-vxlan:bdid> </hw-vxlan:vni-config> </hw-vxlan:nve> </hw-vxlan:vxlan> </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="0"> <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="1"> <rpc-error> <error-app-tag>1</error-app-tag> <error-message>Service process failed.</error-message> <error-info>Error on node /huawei-vxlan:vxlan/nve[id="1"]/vni-config[vni="10"]/bdid</error-info> </rpc-error> </rpc-reply>