AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010 Command Reference

HTTP Server Commands

HTTP Server Commands

display http server

Function

The display http server command displays information about the current HTTP server.

Format

display http server

Parameters

None

Views

All views

Default Level

3: Management level

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                :     
Table 3-34  Description of the display http server command output

Item

Description

HTTP server status

Status of the common HTTP server.
  • Enabled: The HTTP service is enabled.
  • Disabled: The HTTP service is disabled.

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.
  • Enabled: The security HTTP service is enabled.
  • Disabled: The security HTTP service is disabled.

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

Function

The display http user command displays information about current online users.

Format

display http user [ username username ]

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.

Views

All views

Default Level

3: Management level

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 
Table 3-35  Description of the display http user command output

Item

Description

User Name

User name.

Client IP Address

IP address of the HTTP client.

Login Date

Login date and time.

User timeouts

Idle timeout duration of online users.

Related Topics

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.

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To check the state of the Internet access wizard popup notification of the web system of the EasyOperation edition, run this command.

Precautions

The models must support the web system of the EasyOperation edition.

Example

# Display the state of the Internet access wizard popup notification of the web system of the EasyOperation edition.

<Huawei> display fast-configuration state
 Fast-configuration is enabled

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.

Format

http acl acl-number

undo http acl

Parameters

Parameter Description Value
acl-number Specifies the ACL number. The value is an integer that ranges from 2000 to 2999.

Views

System view

Default Level

3: Management level

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.

Example

# Set the ACL number to 2000 for the HTTP server.

<Huawei> system-view
[Huawei] acl 2000
[Huawei-acl-basic-2000] rule 1 permit source any
[Huawei-acl-basic-2000] quit
[Huawei] http acl 2000
Related Topics

http client disable

Function

The http client disable command disabled the HTTP client function.

The undo http client disable command enables the HTTP client function.

By default, the HTTP client function is enabled.

Format

http client disable

undo http client disable

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

As the HTTP client, the device can upload and download files to the server through HTTP by default. After you run the http client disable command to disable the HTTP client function, you cannot upload or download files to the server through HTTP.

Example

# Disable the HTTP client.

<Huawei> system-view
[Huawei] http client disable
Warning: The operation will stop HTTP client. Continue? [Y/N]:y

http get

Function

The http get command detects whether the URL server is reachable.

Format

http get [ -a source-ip-address | -c count | -t timeout | -v http-version ] * url url

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.

Views

System view

Default Level

1: Monitoring level

Usage Guidelines

The http get command detects whether the URL server is reachable. You can use HTTP request packets to detect the following items:
  • 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
Table 3-36  Description of the http get command output

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.
  • Round-trip delay in communication

  • Link reachability

If no response packet is received after the timeout period, the message "Connect times out" is displayed.

http get result statistics

HTTP test statistics:
  • Http Get x time(s): number of outgoing HTTP packets

  • succeed x time(s): number of HTTP request packets of which corresponding HTTP response packets are received

  • failed x time(s): number of HTTP request packets of which corresponding HTTP response packets fail to be received

  • round-trip min/avg/max: minimum, average, and maximum round-trip delay

Related Topics

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.

Format

http server enable

undo http server enable

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

After running the http server enable command to enable the HTTP server, you can use the browser to access the web NMS to manage devices.

If the web page to load does not exist, the HTTP service cannot be enabled.

Example

# Enable the HTTP server.

<Huawei> system-view
[Huawei] http server enable

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.

Format

http server load file-name

undo http server load

Parameters

Parameter Description Settings
file-name

Specifies the name of the web page file to load.

The value is a string of 5 to 64 characters without spaces. The file name is in the *.sfs format or has no file name extension.

Views

System view

Default Level

3: Management level

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.

Example

# Load the web page file web_1.

<Huawei> system-view
[Huawei] http server load web_1
Related Topics

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.

Format

http server max-online-users max-online-users

undo http server max-online-users

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.

Views

System view

Default Level

3: Management level

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.

Example

# Set the maximum number of concurrent online users allowed by the web NMS to 3.

<Huawei> system-view
[Huawei] http server max-online-users 3

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.

-

Views

System view

Default Level

3: Management level

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.

Format

http server port port-number

undo http server port

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.

Views

System view

Default Level

3: Management level

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.

Example

# Set the listening port number of the HTTP server to 1025.

<Huawei> system-view
[Huawei] http server port 1025
Related Topics

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.

-

Views

System view

Default Level

3: Management level

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.

Format

http timeout timeout

undo http timeout

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.

Views

System view

Default Level

3: Management level

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.

Example

# Set the idle timeout duration of the webHTTP server to 6 minutes.

<Huawei> system-view
[Huawei] http timeout 6
Related Topics

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.

Parameters

None

Views

Web view

Default Level

2: Configuration level

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.

Example

# Disable the Internet access wizard popup notification of the web system of the EasyOperation edition.

<Huawei> system-view
[Huawei] web
[Huawei-web] set fast-configuration state disable

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.

Format

set logo-path subpathname

undo set logo-path

Parameters

Parameter Description Value
subpathname

Specifies the name of the subdirectory for storing the logo image.

The value is a string of 1 to 31 characters without spaces.

Views

System view

Default Level

2: Configuration level

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.

Example

# Set the storage directory of the logo image on the web page to the directory example_path.

<Huawei> system-view
[Huawei] set logo-path example_path
Info: Set the vendor picture directory: " example_path " successfully.

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.

Format

set web login-style { professional | simple }

Parameters

Parameter

Description

Value

professional

Sets the Classics edition for web platform login to the router.

-

simple

Sets the EasyOperation edition for web platform login to the router.

-

Views

System view

Default Level

3: Management level

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.

Example

# Set the Classics edition for web platform login to the router.

<Huawei> system-view
[Huawei] set web login-style professional