AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010 Command Reference
HTTP Server Commands
- display http server
- display http user
- display fast-configuration state
- http acl
- http client disable
- http get
- http server enable
- http server load
- http server max-online-users
- http server permit interface
- http server port
- http server-source
- http timeout
- set fast-configuration state disable
- set logo-path
- set web login-style
display http server
Usage Guidelines
You can view the HTTP server information, including the status of common and security HTTP services, port number, maximum number of users allowed to access the HTTP server, and number of current online users.
Example
# Display information about the current HTTP server.
<Huawei> display http server
HTTP server status : Enabled (default: disable) HTTP server port : 80 (default: 80) HTTP timeout interval : 3 (default: 10 minutes) Current online users : 0 Maximum users allowed : 5 HTTPS server status : Disabled (default: disable) HTTPS server port : 443 (default: 443) HTTPS server manager port : HTTPS SSL Policy :
Item |
Description |
---|---|
HTTP server status |
Status of the common HTTP server.
You can configure the common HTTP server status by running the http server enable command. |
HTTP server port |
Number of the listening port on the HTTP server. The default port number is 80. You can configure the HTTP server port number by running the http server port command. |
HTTP timeout interval |
Idle timeout duration of the HTTP server. The default value is 10 minutes. You can configure the idle timeout duration by running the http timeout command. |
Current online users |
Number of current online users. |
Maximum users allowed |
Maximum number of users allowed to access the HTTP server. You can configure the maximum number of users by running the http server max-online-users command. |
HTTPS server status |
Status of the security HTTP server.
You can configure the security HTTP server status by running the http secure-server enable command. |
HTTPS server port |
Port number of the security HTTP server. The default value is 443. You can configure the security HTTP server port number by running the http secure-server port command. |
HTTPS server manager port |
Management port number of the HTTPS server. You can configure the security HTTPS server manager port by running the http secure-server manager-port command. |
HTTPS SSL Policy |
security HTTP SSL policy. You can configure the security HTTP SSL policy by running the ssl policy command. |
display http user
Parameters
Parameter | Description | Value |
---|---|---|
username username | Specifies the name of the current online user. | The value is a string of 1 to 64 case-insensitive characters, with no space or wildcard. When double quotation marks are used around the string, spaces are allowed in the string. |
Usage Guidelines
If username is not specified, this command displays summary information about all online users.
If username is specified, this command displays detailed information about the specified online user.
Example
# Display general information about the current online user.
<Huawei> display http user
--------------------------------------------------------------------------- User Name IP Address Login Date --------------------------------------------------------------------------- admin 192.168.0.1 2011-10-13 11:11:12+00:00 --------------------------------------------------------------------------- Total online users is 1
# Display detailed information about the current online user admin.
<Huawei> display http user username admin
Client IP Address : 192.168.0.1 Login Date : 2011-10-13 11:11:12+00:00 User timeouts : 3 minutes
display fast-configuration state
Function
The display fast-configuration state command displays the state of the Internet access wizard popup notification of the web system of the EasyOperation edition.
Format
display fast-configuration state
Only the AR100&AR120&AR150&AR160&AR200 support this command.
http acl
Function
The http acl command configures an ACL on the HTTP server.
The undo http acl command deletes the ACL on the HTTP server.
By default, no ACL is configured on the HTTP server.
Parameters
Parameter | Description | Value |
---|---|---|
acl-number | Specifies the ACL number. | The value is an integer that ranges from 2000 to 2999. |
Usage Guidelines
Usage Scenario
To ensure the security of an HTTP server, you need to configure an ACL for it to specify clients that can log in to the current HTTP server.
Precautions
The HTTP supports the ACL whose number ranges from 2000 to 2999.
The http acl command takes effect only after you run the rule command to configure the ACL rule.
After an ACL rule is modified, the HTTP server does not forcibly log out an online user who matches the ACL rule until the user sends the next login request.
If the http acl command is configured several times, only the latest configuration takes effect.
http get
Parameters
Parameter | Description | Value |
---|---|---|
-a source-ip-address | Specifies the source IP address of outgoing HTTP request
packets. If this parameter is not specified, the IP address of the outbound interface is used as the source IP address of outgoing HTTP request packets. |
The value is in dotted decimal notation. |
-c count | Specifies the transmission count of HTTP request packets. If the network works unstably, increase the transmission count to detect network quality based on the packet loss ratio. |
The value is an integer ranging from 1 to 100. The default value is 5. |
-t timeout | Specifies the timeout interval for an HTTP response
packet. The http get command sends an HTTP request packet to an address and waits for a response. If the response is received within the timeout interval, the destination is reachable. If no response is received within the timeout interval, the sender displays a message indicating that the request packet times out. A response is received within 1 to 10 seconds after an HTTP request packet is sent. If the transmission speed is low, properly prolong the timeout interval. |
The value is an integer that ranges from 1 to 65535, in milliseconds. The default value is 5000 ms. |
-v http-version | Specifies the HTTP version number. | The HTTP version number is 1.0 or 1.1. The default value is 1.0. |
url url | Specifies the destination URL. | The value is a string of 1 to 256 characters. |
Usage Guidelines
- Whether the HTTP service is enabled on the URL server
- Round-trip delay in communication
- Packet loss
Example
# Check whether the HTTP service is enabled on the URL server with the URL of http://w3.huawei.com, and set the source IP address of outgoing HTTP packets to 10.137.147.142, the transmission count to 5, the period for waiting for a response packet to 100 ms, and the HTTP version number to 1.1.
<Huawei> system-view
[Huawei] http get -a 10.137.147.142 -c 5 -t 100 -v 1.1 url http://w3.huawei.com
Http getting http://w3.huawei.com[10.82.55.199]: 1:packets interaction time 90 ms,the link reachable 2:packets interaction time 100 ms,the link reachable 3:packets interaction time 100 ms,the link reachable 4:packets interaction time 100 ms,the link reachable 5:packets interaction time 90 ms,the link reachable --http get result statistics-- Http Get 5 time(s),succeed 5 time(s),failed 0 time(s). round-trip min/avg/max = 90/96/100 ms
Item |
Description |
---|---|
Http getting x.x.x |
URL and IP address of the URL server. |
x: packets interaction time x ms, the link reachable |
Response to each HTTP packet.
|
http get result statistics |
HTTP test statistics:
|
http server enable
Function
The http server enable command enables the HTTP server function.
The undo http server enable command disables the HTTP server function.
By default, the HTTP server function is enabled.
http server load
Function
The http server load command loads a web page file.
The undo http server load command cancels loading of a specified web page file.
By default, the system loads the default web page file contained in the system software when the HTTP or HTTPS service is enabled.
Usage Guidelines
Usage Scenario
If you need to manage and maintain devices on the graphical user interface (GUI), configure the Web network management function. When you need to update web page file when using the Web network management function, run this command to load web page file.
Prerequisites
Before loading the web page file using the http server load command, ensure that the web page file has been stored to the device; otherwise, file loading will fail.
http server max-online-users
Function
The http server max-online-users command sets the maximum number of concurrent online users allowed by the web NMS.
The undo http server max-online-users command restores the number of concurrent online users allowed by the web NMS to the default value.
By default, the maximum number of concurrent online users allowed by the web NMS is 5.
Parameters
Parameter | Description | Value |
---|---|---|
max-online-users | Specifies the maximum number of concurrent online users allowed by the web NMS. | The value is an integer that ranges from 1 to 5. The default value is 5. |
Usage Guidelines
Usage Scenario
You can run this command to set the maximum number of concurrent online users allowed by the web NMS. By doing so, the number of users allowed to simultaneously access the web NMS is limited.
Precautions
When the number of users that have logged in is larger than the value specified by this command, extra users will not be forced to go offline. For example, five users have logged in to the web NMS. If you run this command to set the maximum number of concurrent online users allowed by the web NMS to 3, two extra users will not be forced to go offline.
http server permit interface
Function
The http server permit interface command configures interfaces through which users can access the web platform.
The undo http server permit interface command deletes the configured interfaces so that users can access the web platform using all interfaces on the device.
By default, all interfaces on the device allow clients to access the web system.
Format
http server permit interface { interface-type interface-number } &<1-5>
undo http server permit interface
Parameters
Parameter | Description | Value |
---|---|---|
interface-type interface-number | interface-type specifies the interface type. interface-number specifies the number of an interface. interface-number and interface-type specify an interface. |
- |
Usage Guidelines
Usage Scenario
To prevent unauthorized users from accessing the web platform through interfaces on the device, run the http server permit interface command to configure interfaces through which users can access the web platform.
Precautions
You can only run the http server permit interface command to configure physical interfaces and VLANIF interfaces.
In the factory default settings of the device, users can only access the web platform through management interfaces. For example, when the management interface of the device is GE0, the http server permit interface GigabitEthernet0/0/0 command is contained in the factory default settings of the device.
A maximum of five interfaces can be configured. If you run the http server permit interface command multiple times, only the latest configuration takes effect, For example, if GigabitEthernet 1/0/0, GigabitEthernet 2/0/0, and GigabitEthernet 3/0/0 has been configured, and then run the http server permit interface command to configure GigabitEthernet 1/0/0, users can access the web platform only through GigabitEthernet 1/0/0.
Example
# Configure the interfaces through which users can access the web platform.
<Huawei> system-view [Huawei] http server permit interface GigabitEthernet 1/0/0 GigabitEthernet 2/0/0 Info: Successed in setting web permit interface.
# Delete the configured interfaces so that users can access the web platform using all interfaces on the device.
<Huawei> system-view [Huawei] undo http server permit interface
http server port
Function
The http server port command sets the listening port number of the HTTP server.
The undo http server port command restores the default listening port number of the HTTP server.
By default, the listening port number of the HTTP server is 80.
Parameters
Parameter | Description | Value |
---|---|---|
port-number | Specifies the listening port number of the HTTP server. | The value is an integer that ranges from The value is 80, or an integer that ranges from 1025 to 51200. The default value is 80. |
Usage Guidelines
Usage Scenario
By default, the listening port number of the security HTTP server is 80. Attackers may frequently access the default listening port, which wastes bandwidth, deteriorates server performance, and prevents authorized users from accessing the HTTP server through the listening port. You can run the http server port command to specify another listening port number to prevent attackers from accessing the listening port.
Precautions
If the http server port command is configured several times, only the latest configuration takes effect.
http server-source
Function
The http server-source command specifies a source IP address for an HTTP server.
The undo http server-source command deletes the source IP address of an HTTP server.
By default, the source IP address of an HTTP server is not specified.
Format
http server-source { -a source-ip-address | -i interface-type interface-number }
undo http server-source
Parameters
Parameter | Description | Value |
---|---|---|
-a source-ip-address | Specifies the source IP address for the HTTP server. The loopback IP address is recommended. |
- |
-i interface-type interface-number | Specifies the loopback interface of the HTTP server as the source interface. If no loopback interface is configured or no IP address is configured for the source interface, the command fails to be executed. |
- |
Usage Guidelines
Usage Scenario
If no source IP address is specified, the HTTP server uses the source IP address specified by routes to send and receive packets. The source IP address must be configured for an interface with stable performance, such as the loopback interface. Using the loopback interface as the source IP address simplifies the ACL rule and security policy configuration. This shields the IP address differences and interface status impact, filters incoming and outgoing packets, and implements security authentication.
Precautions
- After the source IP address is specified for the HTTP server, you must use the specified IP address to log in to the HTTP server.
- If the HTTP service has been enabled, the HTTP service restarts after the http server-source command is executed.
Example
# Set the source IP address of the HTTP server to LoopBack0.
<Huawei> system-view [Huawei] http server-source -i loopback 0 Warning: To make the server source configuration take effect, the HTTP server will be restarted. Continue? (y/n)[n]:y Info: Succeeded in setting the source IP or interface of the HTTP server
http timeout
Function
The http timeout command sets the idle timeout duration of the web server.
The undo http timeout command restores the default idle timeout duration of the webHTTP server.
By default, the idle timeout duration of the web server is 10 minutes.
Parameters
Parameter | Description | Value |
---|---|---|
timeout | Specifies the idle timeout duration of the web server for online users. | The value is an integer that ranges from 1 to 35791, in minutes. |
Usage Guidelines
Usage Scenario
A maximum of five web users are supported at present. When the fifth web user logs in to the web server, any other user cannot log in to the web server even if any of the five users does not perform operations for a long time. The idle timeout duration is configured to release web resources in time. To occupy web channels for a long time, you must set the idle timeout duration to the maximum value.
Precautions
After you run the http timeout command, the idle timeout durations are the same for all web users who log in to the web server. If the idle timeout duration expires, a user is disconnected from the web server and the web server notifies the user only after the user sends the next login request.
If the http timeout command is configured several times, only the latest configuration takes effect.
set fast-configuration state disable
Function
The set fast-configuration state disable command disables the Internet access wizard popup notification of the web system of the EasyOperation edition.
The undo set fast-configuration state disable command enables the Internet access wizard popup notification of the web system of the EasyOperation edition.
By default, the Internet access wizard popup notification of the web system of the EasyOperation edition is enabled.
Format
set fast-configuration state disable
undo set fast-configuration state disable
Only the AR100&AR120&AR150&AR160&AR200 support this command.
Usage Guidelines
Usage Scenario
When a user has configured the Internet access wizard function and logs in to the web system of the EasyOperation edition again, if the Internet access wizard popup notification is not required, run the set fast-configuration state disable to disable the Internet access wizard popup notification. If the Internet access wizard popup notification is required, run the undo set fast-configuration state disable command.
Precautions
The models must support the web system of the EasyOperation edition.
set logo-path
Function
The set logo-path command sets the storage directory of the logo image on the web page.
The undo set logo-path command cancels the configured storage directory of the logo image on the web page.
By default, the storage directory of the Huawei logo image is used.
Usage Guidelines
Usage Scenario
The device supports customization of the logo image on the web page. You can create a subdirectory for storing the logo image under the directory logo-path of the default working directory on the device, and store the logo image to be displayed in the subdirectory. You can run the set logo-path command to configure the subdirectory as the storage directory of the logo image on the web page. The required logo image then can be displayed on the web page.
The default working directory on the AR2220–AC, AR2220–DC, AR2240, AR2240C, and AR3200 series is sd1:, and that on other models is flash:.
Prerequisites
When setting the storage directory of the logo image on the web page using the set logo-path command, ensure that a subdirectory for storing the logo image has been created using the mkdir command under the directory logo-path of the default working directory.
Precautions
Store the logo image using the required file name and size in the created subdirectory. After the storage directory of the logo image on the web page is set using the set logo-path command, the device automatically reads the file under the directory and changes the logo image on the web page.
Store three files with different pixel sizes of the required logo image in the created subdirectory, and name them as required. Name the image with the pixel size 16x16 logo1.png, the image with the pixel size 21x22 logo2.png, and the image with the pixel size 44x44 logo3.png.
Configuration Impact
After the storage directory of the logo image on the web page is set using the set logo-path command, the logo image on the web page varies depending on the configuration.
set web login-style
Function
The set web login-style command sets the edition for web platform login to a router.
By default, the EasyOperation edition is used for web platform login to a router.
Only the AR100&AR120&AR150&AR160&AR200 series routers support this command.
Usage Guidelines
By default, the EasyOperation edition is used for web platform login to the AR100&AR120&AR150&AR160&AR200 series routers. To log in to the Classics web platform, run the set web login-style professional command to set the web platform edition. To restore the EasyOperation edition, run the set web login-style simple command.
- display http server
- display http user
- display fast-configuration state
- http acl
- http client disable
- http get
- http server enable
- http server load
- http server max-online-users
- http server permit interface
- http server port
- http server-source
- http timeout
- set fast-configuration state disable
- set logo-path
- set web login-style