This section describes how to enable IPSG using the rpc method.
Operation |
XPATH |
|---|---|
rpc |
/ietf-interfaces:interfaces/interface/huawei-traffic-security:security/binding-config/binding-check-enable |
Data requirement
Item |
Data |
Description |
|---|---|---|
IPSG enablement status |
ipv4-check |
Indicates that IPv4 IPSG is enabled on the interface. |
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="31" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<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>
<hw-traffic-security:security xmlns:hw-traffic-security="urn:huawei:params:xml:ns:yang:huawei-traffic-security">
<hw-traffic-security:binding-config>
<hw-traffic-security:binding-check-enable>ipv4-check</hw-traffic-security:binding-check-enable>
</hw-traffic-security:binding-config>
</hw-traffic-security:security>
</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="31"> <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="32">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>parse rpc config error.</error-message>
</rpc-error>
</rpc-reply>