The server-detect command enables the detection and keepalive function on a Portal server.
The undo server-detect command disables the detection and keepalive function on a Portal server.
By default, the detection and keepalive function of the Portal server is disabled.
server-detect { interval interval-period | max-times times | action { log | trap | permit-all } * } *
undo server-detect [ action { log | trap | permit-all } * ]
Parameter |
Description |
Value |
|---|---|---|
interval interval-period |
Specifies the detection interval of the Portal server. |
The value is an integer that ranges from 30 to 65535, in seconds. The default value is 60. |
max-times times |
Specifies the maximum number of times that the detection fails. |
The value is an integer that ranges from 1 to 255. The default value is 3. |
critical-num critical-num |
Specifies the minimum number of Portal servers in Up state. |
The value is an integer that ranges from 0 to 128. The default value is 0. |
action |
Specifies the action to be taken after the number of detection failures exceeds the maximum. |
- |
log |
Indicates that the device sends a log after the number of detection failures exceeds the maximum. |
- |
trap |
Indicates that the device sends a trap after the number of detection failures exceeds the maximum. |
- |
permit-all |
Cancels Portal authentication on an interface after the number of detection failures exceeds the maximum. |
- |
In networking where Portal authentication is used, if communication is interrupted because the network between the device and Portal server is disconnected or the Portal server is faulty, new Portal authentication users cannot go online.
After running the server-detect command in the Portal server template view, the device detects all the Portal servers defined in the Portal server template. The device changes the status of a Portal server from Up to Down if the number of detection failures for the Portal server exceeds the maximum value, and the device sends a trap or log to the administrator. If the number of Portal servers in Up state is less than the value specified by critical-num, the keepalive function is enabled. That is, the device allows Portal users on the VLANIF interface bound to the Portal server template to go online.
The detection interval of the Portal server multiplied by the maximum number of detection failures cannot be less than the keepalive heartbeat interval of the Portal server. It is recommended that the configured detection interval of the Portal server be greater than the keepalive heartbeat interval of the Portal server.
# Enable the Portal server detection and keepalive function in the Portal server template abc, set the detection interval to 100s, set the maximum number of failures to 5, disable Portal authentication on the interface, and specify the log sent after the number of failures exceeds the limit.
<HUAWEI> system-view [HUAWEI] web-auth-server abc [HUAWEI-web-auth-server-abc] server-detect interval 100 max-times 5 critical-num 3 action log permit-all