This section describes how to disable DHCP snooping on an interface using the rpc method.
Operation |
XPATH |
---|---|
rpc |
|
Item |
Data |
Description |
---|---|---|
Interface |
GE0/0/1 | Disable DHCP snooping on GE0/0/1. |
Whether DHCP snooping is disabled |
true |
<rpc message-id="123" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet0/0/1</name> <description>savi</description> <type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</type> <enabled>true</enabled> </interface> </interfaces> <hw-savi:dhcp-config xmlns="urn:huawei:params:xml:ns:yang:huawei-dhcp"> <hw-savi:dhcpv4-config> <hw-savi:enable>true</hw-savi:enable> </hw-savi:dhcpv4-config> </hw-savi:dhcp-config> <hw-savi:savi xmlns="urn:huawei:params:xml:ns:yang:huawei-savi"> <hw-savi:dhcp-snooping xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge"> <hw-savi:snooping-global-enable> <hw-savi:ipv4-enable>true</hw-savi:ipv4-enable> </hw-savi:snooping-global-enable> <hw-savi:snooping> <hw-savi:interface> <hw-savi:interface-name>GigabitEthernet0/0/1</hw-savi:interface-name> <hw-savi:disable>true</hw-savi:disable> </hw-savi:interface> </hw-savi:snooping> </hw-savi:dhcp-snooping> </hw-savi:savi> </config> </edit-config> </rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> <ok/> </rpc-reply>
Sample of failed response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message> Please enable DHCP snooping in the global view first.</error-message> <error-info>Error on node /huawei-savi:savi/dhcp-snooping/snooping/interface/disable</error-info> </rpc-error> </rpc-reply>