This section describes how to configure ND snooping using the merge method.
Operation |
XPATH |
|---|---|
merge |
|
Item |
Data |
Description |
|---|---|---|
Whether to enable ND snooping globally. |
true |
Configure ND snooping on GE0/0/1 connected to the user, configure the interface as a trusted interface, and enable ND protocol packet validity check. Configure ND snooping in VLAN 10 to which the user belongs, configure the interface GE0/0/2 in the VLAN as a trusted interface, and enable ND protocol packet validity check. |
Whether ND snooping is enabled on GE0/0/1 connected to the user, whether the interface is a trusted interface, and whether to enable ND protocol packet validity check. |
true |
|
Whether ND Snooping is enabled in the VLAN to which the user belongs, whether GE0/0/2 in VLAN 10 is a trusted interface, and whether the ND packet validity check function is enabled. |
true |
<rpc message-id="123" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
<huawei-vlan:vlan>
<huawei-vlan:id>10</huawei-vlan:id>
</huawei-vlan:vlan>
</huawei-vlan:vlans>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
<if:name>GigabitEthernet0/0/1</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
</if:interface>
</if:interfaces>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
<if:name>GigabitEthernet0/0/2</if:name>
<if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
</if:interface>
</if:interfaces>
<hw-savi:savi xmlns:hw-savi="urn:huawei:params:xml:ns:yang:huawei-savi">
<hw-savi:nd-snooping>
<hw-savi:nd-snooping-global-enable>
<hw-savi:enable>true</hw-savi:enable>
</hw-savi:nd-snooping-global-enable>
<hw-savi:snooping>
<hw-savi:interface>
<hw-savi:interface-name>GigabitEthernet0/0/1</hw-savi:interface-name>
<hw-savi:snooping-enable>true</hw-savi:snooping-enable>
<hw-savi:snooping-trust-enable>true</hw-savi:snooping-trust-enable>
</hw-savi:interface>
<hw-savi:vlan>
<hw-savi:vlan-id>10</hw-savi:vlan-id>
<hw-savi:snooping-enable>true</hw-savi:snooping-enable>
</hw-savi:vlan>
<hw-savi:vlan-and-interface>
<hw-savi:vlan-id>10</hw-savi:vlan-id>
<hw-savi:interface-name>GigabitEthernet0/0/2</hw-savi:interface-name>
<hw-savi:snooping-trust-enable>true</hw-savi:snooping-trust-enable>
</hw-savi:vlan-and-interface>
</hw-savi:snooping>
<hw-savi:nd-message-check>
<hw-savi:interface>
<hw-savi:interface-name>GigabitEthernet0/0/1</hw-savi:interface-name>
<hw-savi:na-enable>true</hw-savi:na-enable>
<hw-savi:ns-enable>true</hw-savi:ns-enable>
<hw-savi:rs-enable>true</hw-savi:rs-enable>
</hw-savi:interface>
<hw-savi:vlan>
<hw-savi:vlan-id>10</hw-savi:vlan-id>
<hw-savi:na-enable>true</hw-savi:na-enable>
<hw-savi:ns-enable>true</hw-savi:ns-enable>
<hw-savi:rs-enable>true</hw-savi:rs-enable>
</hw-savi:vlan>
</hw-savi:nd-message-check>
</hw-savi:nd-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>Service process failed.</error-message>
<error-info>Error on node /huawei-savi:savi/nd-snooping/nd-snooping-global-enable/enable</error-info>
</rpc-error>
</rpc-reply>