Free Mobility
This section describes the configuration model of free mobility and provides examples of XML packets.
Data Model
The configuration model file matching free mobility is huawei-free-mobility.yang.
Object |
Description |
Value Range |
Remarks |
---|---|---|---|
/huawei-free-mobility:group-policy/controller/address |
Specifies the IP address of the primary controller. |
The value is in dotted decimal format. |
N/A |
/huawei-free-mobility:group-policy/controller/port |
Specifies the port number used by the device to exchange packets with the primary controller. |
The value is an integer in the range from 1 to 65535. The default port number is 5222. |
N/A |
/huawei-free-mobility:group-policy/controller/password |
Specifies the password for connecting the device to controllers. |
The password configured on the device must be the same as that configured on controllers. The password configured on a controller needs to meet the following rules:
|
N/A |
/huawei-free-mobility:group-policy/controller/src-address |
Specifies the source IP address that the device uses to communicate with a controller. |
The value is in dotted decimal format. |
N/A |
/huawei-free-mobility:group-policy/controller/backup/address |
Specifies the IP address of the secondary controller. |
The value is in dotted decimal format. |
N/A |
/huawei-free-mobility:group-policy/controller/backup/port |
Specifies the port number used by the device to exchange packets with the secondary controller. |
The value is an integer in the range from 1 to 65535. The default port number is 5222. |
N/A |
/huawei-free-mobility:group-policy/user-group/version |
Specifies the user group version used for free mobility. |
The value is an integer in the range from 0 to 4294967295. The version needs to be obtained from the controller database. NOTE:
The configured version must be consistent with the version obtained from the controller database. Otherwise, the switch configuration is inconsistent with the controller configuration or the controller configuration fails to be delivered to the switch. |
N/A |
/huawei-free-mobility:group-policy/user-group/policy-version |
Specifies the user group policy version used for free mobility. |
The value is an integer in the range from 0 to 4294967295. The version needs to be obtained from the controller database. NOTE:
The configured version must be consistent with the version obtained from the controller database. Otherwise, the switch configuration is inconsistent with the controller configuration or the controller configuration fails to be delivered to the switch. |
N/A |
/huawei-free-mobility:group-policy/controller/vpn-name |
Specifies the name of a VPN instance used by the device to communicate with controllers. |
The VPN instance must already exist. |
N/A |
Configuring Free Mobility
This section provides a sample of configuring free mobility using the rpc method.
Operation |
XPATH |
---|---|
Config |
/huawei-free-mobility:group-policy/controller |
Data requirement
Item |
Data |
Description |
---|---|---|
IP address of the primary controller |
10.10.10.10 |
Set the IP address of the primary controller to 10.10.10.10. |
Port number used by the device to communicate with the primary controller |
5200 |
Set the port number used by the device to communicate with the primary controller to 5200. |
Password |
huawei@123 |
Set the password for connecting the device to controllers huawei@123. |
Source IP address of the device |
192.168.50.10 |
Set the source IP address that the device uses to communicate with a controller to 192.168.50.10. |
IP address of the secondary controller |
10.10.10.12 |
Set the IP address of the secondary controller to 10.10.10.12. |
Port number used by the device to communicate with the secondary controller |
5201 |
Set the port number used by the device to communicate with the secondary controller to 5201. |
Request example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <huawei-free-mobility:group-policy xmlns:huawei-free-mobility="urn:huawei:yang:huawei-free-mobility"> <huawei-free-mobility:controller> <huawei-free-mobility:address>10.10.10.10</huawei-free-mobility:address> <huawei-free-mobility:port>5200</huawei-free-mobility:port> <huawei-free-mobility:password>huawei@123</huawei-free-mobility:password> <huawei-free-mobility:src-address>192.168.50.10</huawei-free-mobility:src-address> <huawei-free-mobility:backup> <huawei-free-mobility:address>10.10.10.12</huawei-free-mobility:address> <huawei-free-mobility:port>5201</huawei-free-mobility:port> </huawei-free-mobility:backup> </huawei-free-mobility:controller> </huawei-free-mobility:group-policy> </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="3"> <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="8"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message> The source IP address does not exist in this device.</error-message> <error-info>Error on node /huawei-free-mobility:group-policy/controller</error-info> </rpc-error> </rpc-reply>