2.10. HTTP commands Commands

2.10.1. service http

Command Purpose

To enable HTTP service, use service http enable command in Global Configuration. To disable HTTP service, use service http disable command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

service http ( enable | disable )

Parameter

Parameter Description

Parameter Value

enable

Turn on the HTTP service

-

disable

Turn off the HTTP service

-

Command Mode

Global Config

Default

HTTP service is disabled.

Usage

The WEB image should be loaded first.

Examples

The following example shows how to enable HTTP service:

Switch# configure terminal
Switch(config)# service http enable

2.10.2. service https

Command Purpose

To enable HTTPS service, use service http enable command in Global Configuration. To disable HTTPS service, use service http disable command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

service https ( enable | disable )

Parameter

Parameter Description

Parameter Value

enable

Turn on the HTTPS service

-

disable

Turn off the HTTPS service

-

Command Mode

Global Config

Default

HTTPS service is disabled.

Usage

The WEB image should be loaded first.

Examples

The following example shows how to enable HTTPS service:

Switch# configure terminal
Switch(config)# service https enable

Related Commands

http server load

http timeout

2.10.3. http server load

Command Purpose

To load WEB image, user the http server load command .

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

http server load FILENAME

Parameter

Parameter Description

Parameter Value

FILENAME

Name of WEB image

-

Command Mode

Global Config

Default

None

Usage

None

Examples

The following example shows how to specify web image:

Switch# configure terminal
Switch(config)# http server load flash:/webImage.bin

Related Commands

service http enable

service https enable

http timeout

2.10.4. http timeout

Command Purpose

To configure the expire time of online web users.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

http timeout TIMEOUT

Parameter

Parameter Description

Parameter Value

TIMEOUT

Online web user expire time.

The range is [1,60], unit is minute.

Command Mode

Global Config

Default

20min.

Usage

None

Examples

The following example shows how to configure http timeout:

Switch# configure terminal
Switch(config)# http timeout 30

Related Commands

http server load

service http enable

service https enable

2.10.5. http server source address

Command Purpose

To configure the source address of WEB server on your switch, use the http server source address command in Global Config. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

http server source address ( vrf NAME | ) A.B.C.D

no http server source address

Parameter

Parameter Description

Parameter Value

vrf NAME

Specify a vrf to provide WEB server

A string with 1-15 characters

A.B.C.D

Configure IP address for WEB server working

-

Command Mode

Global Config

Default

None

Usage

You can use this command to modify the address which WEB server works on, and specify a vrf to provide WEB server. The source address can only be 0.0.0.0 or loopback interface’s address, 0.0.0.0 indicates that the WEB server address is not specified.

Examples

The following example shows how to set inband http server address:

Switch# configure terminal
Switch(config)# http server source address 10.10.10.1

Related Commands

http server load

service http enable

service https enable

2.10.6. http server source port

Command Purpose

To configure the TCP port for HTTP server working inband on your switch, use the http server source port command in Global Config. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

http server source port PORT

no http server source port

Parameter

Parameter Description

Parameter Value

PORT

Configure TCP port for HTTP server working inband

1025-65535

Command Mode

Global Config

Default

80

Usage

The CLI of no http server source port will configure TCP port for HTTP server working inband with default value of 80.

Examples

The following example shows how to set inband http server TCP port:

Switch# configure terminal
Switch(config)# http server source port 1080

Related Commands

http server load

service http enable

service https enable

2.10.7. http server source ssl-port

Command Purpose

To configure the TCP port for HTTPS server working inband on your switch, use the http server source ssl-port command in Global Configuration. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

http server source ssl-port PORT

no http server source ssl-port

Parameter

Parameter Description

Parameter Value

PORT

Configure TCP port for HTTPS server working inband

1025-65535

Command Mode

Global Config

Default

443

Usage

The CLI of no http server source ssl-port will configure TCP port for HTTPS server working inband with default value of 443.

Examples

The following example shows how to set inband https server TCP port:

Switch# configure terminal
Switch(config)# http server source port 10443

Switch# configure terminal
Switch(config)# http server source ssl-port 10443

Related Commands

http server load

service http enable

service https enable

2.10.8. http server source mgmt-if port

Command Purpose

To configure the TCP port for HTTP server working outband on your switch, use the http server source mgmt-if port command in Global Configuration. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

http server source mgmt-if port PORT

no http server source mgmt-if port

Parameter

Parameter Description

Parameter Value

PORT

Configure TCP port for HTTP server working outband

1025-65535

Command Mode

Global Config

Default

80

Usage

The CLI of no http server source mgmt-if port will configure TCP port for HTTP server working outband with default value of 80.

Examples

The following example shows how to set outband http server TCP port:

Switch# configure terminal
Switch(config)# http server source mgmt-if port 1080

Related Commands

http server load

service http enable

service https enable

2.10.9. http server source mgmt-if ssl-port

Command Purpose

To configure the TCP port for HTTPS server working outband on your switch, use the http server source mgmt-if ssl-port command in Global Configuration. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

http server source mgmt-if ssl-port PORT

no http server source mgmt-if port

Parameter

Parameter Description

Parameter Value

PORT

Configure TCP port for HTTPS server working outband

1025-65535

Command Mode

Global Config

Default

443

Usage

The CLI of no http server source mgmt-if ssl-port will configure TCP port for HTTPS server working outband with default value of 443.

Examples

The following example shows how to set outband https server TCP port:

Switch# configure terminal
Switch(config)# http server source port 10443

Related Commands

http server load

service http enable

service https enable

2.10.10. http authentication aaa

Command Purpose

To configure the AAA method list for web login on your switch, use the http authentication aaa command in Global Config. To restore the default value, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

http authentication ( local | aaa ( login-authentication | exec-authorization ) ( default | LISTNAME ) )

no http authentication ( aaa ( login-authentication | exec-authorization ) )

Parameter

Parameter Description

Parameter Value

local

Configure web login authentication by local

-

aaa

Configure web login authentication by AAA

-

login-authentication

Configure web login authentication method list

-

exec-authorization

Configure web login authorization method list

-

default

Set method list name default

-

LISTNAME

Set method list name

Up to 31 characters

Command Mode

Global Config

Default

default web login method is local

Usage

The CLI of “http authentication (local |aaa (login-authenticationLISTNAME))” can only be configured when AAA is enable.

Examples

The following example shows how to set web AAA login method to be default:

Switch# configure terminal
Switch(config)# http authentication aaa login-authentication default

Related Commands

aaa new-model

aaa authentication login

aaa authorization exec

2.10.11. show services http

Command Purpose

Use this command to view http configuration information

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show services http

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

Use this command to view http configuration information:

Switch# show services http 

HTTP service configuration:
 Service HTTP                            : disable
 Service HTTPS                           : disable
 HTTP Timeout                            : 20
 HTTP Server Source Address              : 0.0.0.0
 HTTP Server Source Port                 : 80
 HTTP Server Source Mgmt-if Port         : 80
 HTTP Server Source SSL-port             : 443
 HTTP Server Source Mgmt-if SSL-port     : 443

Related Commands

None