< Home

Enabling Remote Access Control on the Interface of an Authentication Access Device

This section provides a sample of enabling remote access control on the interface of an authentication access device using the merge method.

Table 1 Enabling remote access control on the interface of an authentication access device

Operation

XPATH

edit-config:merge

ietf-interfaces:interfaces/ietf-interfaces:interface/huawei-nac:police-gang-control/huawei-nac:access-point/huawei-nac:enable

Data Requirements

Table 2 Enabling remote access control on the interface of an authentication access device

Item

Data

Description

name

GigabitEthernet0/0/13

-

enabled

true

-

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
    <edit-config>
        <target>
            <running/>
        </target>
        <error-option>rollback-on-error</error-option>
        <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
            <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" xc:operation="merge">
                <interface>
                    <name>GigabitEthernet0/0/13</name>
                    <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
                    <enabled>true</enabled>
                    <police-gang-control xmlns="urn:huawei:params:xml:ns:yang:huawei-nac">
                        <access-point>
                            <enable>true</enable>
                        </access-point>
                    </police-gang-control>
                </interface>
            </interfaces>
        </config>
    </edit-config>
</rpc>

Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
 <ok/>
</rpc-reply>

Sample of failed response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-path>/ietf-interfaces:interfaces/interface[name='GigabitEthernet0/0/13']/huawei-nac:police-gang-control/access-point/enable</error-path>
    <error-message>parse rpc config error.(Invalid value "error" in "enable" element.).</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >