This section provides a sample of configuring the MAC address of a VBDIF interface using the config method.
Operation |
XPATH |
|---|---|
config |
/ietf-interfaces:interfaces/interface/huawei-interfaces:common/phys-address |
Data Requirements
Item |
Data |
Description |
|---|---|---|
MAC address |
0000-5e00-0101 |
Set the MAC address of the VBDIF interface to 0000-5e00-0101. |
Request Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="7" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd">
<bd:bridge-domain>
<bd:id>3</bd:id>
</bd:bridge-domain>
</bd:bridge-domains>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name>Vbdif3</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
<huawei-interfaces:common xmlns:huawei-interfaces="urn:huawei:params:xml:ns:yang:huawei-interfaces"> <huawei-interfaces:phys-address>00:00:5e:00:01:01</huawei-interfaces:phys-address>
</huawei-interfaces:common>
</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="7"> <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="7">
<rpc-error>
<error-app-tag>-1</error-app-tag>
<error-message> The MAC address configured on the interface ranges from 0000-5e00-0100 to 0000-5e00-01ff.</error-message>
<error-info>Error on node /ietf-interfaces:interfaces/interface[name="Vbdif3"]/huawei-interfaces:common/phys-address</error-info>
</rpc-error>
</rpc-reply>