This section provides a sample of configuring a VPN instance for the switch to communicate with the Portal server using the merge method. You can also use the create method to configure a VPN instance for the switch to communicate with the Portal server.
Operation |
XPATH |
|---|---|
edit-config:merge |
/huawei-aaa-portal:portal/portal-server/vpn-instance |
Item |
Data |
Description |
|---|---|---|
vpn-instance |
vpna |
Configure the VPN instance vpna for the switch to communicate with the Portal server. The VPN instance must exist on the switch. |
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123">
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<target>
<running/>
</target>
<error-option>rollback-on-error</error-option>
<config>
<hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn">
<hw-l3vpn:vpn-instance>
<hw-l3vpn:vpn-instance-name>vpna</hw-l3vpn:vpn-instance-name>
</hw-l3vpn:vpn-instance>
</hw-l3vpn:vpn-instances>
<portal xmlns="urn:huawei:params:xml:ns:yang:huawei-aaa-portal">
<portal-server>
<name>webauth1</name>
<vpn-instance>vpna</vpn-instance>
</portal-server>
</portal>
</config>
</edit-config>
</rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_012824316d704d43adb16b1a4245d273"> <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="19">
<rpc-error>
<error-app-tag>-1</error-app-tag>
<error-message> The vpn-instance does not exist or is invalid.</error-message>
<error-info>Error on node /huawei-aaa-portal:portal/portal-server[name="webauth1"]/vpn-instance</error-info>
</rpc-error>
</rpc-reply>