Web Server Commands

This chapter contains the following sections:

ip http secure-server

To enable the HTTPS service on the switch, use the ip http secure-server Global Configuration mode command.

To disable the HTTPS service on the switch, use the no form of this command.

Syntax

ip http secure-server

no ip http secure-server

Parameters

N/A

Default Configuration

The HTTPS service is enabled by default.

Command Mode

Global Configuration mode

Example

switchxxxxxx(config)# ip http secure-server

ip http server

To enable the HTTP service on the switch, use the ip http server Global Configuration mode command.

To disable the HTTP service on the switch, use the no form of this command.

Syntax

ip http server

no ip http server

Parameters

N/A

Default Configuration

The HTTP service is enabled by default.

Command Mode

Global Configuration mode

Example

switchxxxxxx(config)# ip http server

ip http timeout-policy

To set the interval that the switch waits for user inputs for HTTP or HTTPS sessions before automatic logoff, use the ip http timeout-policy Global Configuration mode command.

To revert to its default setting, use the no form of this command.

Syntax

ip http timeout-policy minutes [http-only | https-only]

no ip http timeout-policy [http-only | https-only]

Parameters

minutes—Maximum number of seconds that a connection is kept open if no data is received or the response data cannot be sent out. (Range: 0 to 86400 seconds, 0 indicates no timeout)

http-only—(Optional) Specifies the timeout for HTTPS sessions only.

https-only—(Optional) Specifies the timeout for HTTPS sessions only.

Default Configuration

The default timeout for HTTP and HTTPS sessions is 10 seconds.

Command Mode

Global Configuration mode

User Guidelines

To specify no timeout, enter the ip http timeout-policy 0 command.

Example

The following example configures the HTTP timeout to 1000 seconds:

switchxxxxxx(config)# ip http timeout-policy 1000

show ip http

To show the HTTP service information, use the show ip http Privileged EXEC mode command.

Syntax

show ip http

Command Mode

Privileged EXEC mode

Example

switchxxxxxx# show ip http
     HTTP daemon : enabled
Session Timeout : 10 (minutes)

The following table describes the significant fields shown in the example:

Field

Description

HTTP daemon

Shows that the HTTP daemon is enabled or disabled on the switch.

Session Timeout

Timeout in minutes for HTTP sessions.

show ip https

To shows the HTTPS service information, use the show ip https Privileged EXEC mode command.

Syntax

show ip https

Command Mode

Privileged EXEC mode

Example

switchxxxxxx# show ip https
    HTTPS daemon : enabled
Session Timeout : 10 (minutes)

The following table describes the significant fields shown in the example:

Field

Description

HTTPS daemon

Shows that the HTTPS daemon is enabled or disabled on the switch.

Session Timeout

Timeout in minutes for HTTPS sessions.

show services tcp-udp

To show information for all open TCP or UDP sessions, use the show services tcp-udp Privileged EXEC mode command.

Syntax

show services tcp-udp

Parameters

N/A

Command Mode

Privileged EXEC mode

Example

switchxxxxxx# show services tcp-udp
Type  Local IP address              Remote IP address             Service  State
----  ----------------------------- ----------------------------- -------- -----
---------
tcp   *:80                          *:*                           http     LISTE
N
tcp6  *-80                          *-*                           http     LISTE
N
tcp   *:22                          *:*                           ssh      LISTE
N
tcp6  *-22                          *-*                           ssh      LISTE
N
tcp   *:23                          *:*                           telnet   LISTE
N
tcp6  *-23                          *-*                           telnet   LISTE
N
tcp   *:443                         *:*                           https    LISTE
N
tcp6  *-443                         *-*                           https    LISTE
N
tcp   192.168.1.254:23              192.168.1.107:57739           telnet   ESTAB
LISHED
tcp   192.168.1.254:80              192.168.1.107:52333           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52335           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52334           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52336           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52339           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52358           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52379           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52380           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52382           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52389           http     TIME_
WAIT
tcp   192.168.1.254:80              192.168.1.107:52388           http     TIME_
WAIT
tcp   192.168.1.254:23              192.168.1.107:52381           telnet   ESTAB
LISHED
udp   *:161                         *:*                           snmp
udp6  *-161                         *-*                           snmp

The following table describes the significant fields shown in the example:

Field

Description

Type

Protocol type of the service.

Local IP Address

IP address and port number of the local end of the socket.

Remote IP Address

IP address and port number of the remote end of the socket.

Service

Name of the service.

State

State of the socket. Because there are no states in raw mode and usually no states used in UDP, this column may be left blank. Normally this can be one of several values:

  • ESTABLISHED—The socket has an established connection.

  • SYN_SENT—The socket is actively attempting to establish a connection.

  • SYN_RECV—A connection request has been received from the network.

  • FIN_WAIT1—The socket is closed, and the connection is shutting down.

  • FIN_WAIT2—The connection is closed, and the socket is waiting for a shutdown from the remote end.

  • TIME_WAIT—The socket is waiting after close to handle packets still in the network.

  • CLOSED—The socket is not being used.

  • CLOSE_WAIT—The remote end has shut down, waiting for the socket to close.

  • LAST_ACK—The remote end has shut down, and the socket is closed. Waiting for acknowledgment.

  • LISTEN—The socket is listening for incoming connections. Such sockets are not included in the output unless you specify the --listening (-l) or --all (-a) option.

  • CLOSING—Both sockets are shut down but we still do not have all our data sent.

  • UNKNOWN—The state of the socket is unknown.

Where to Go From Here

Cisco provides a wide range of resources to help you and your customer obtain the full benefits of the Cisco 220 Series Smart Switches.

Support

Cisco Support Community

www.cisco.com/go/smallbizsupport

Cisco Support and Resources

www.cisco.com/go/smallbizhelp

Phone Support Contacts

www.cisco.com/en/US/support/tsd_cisco_small_business _support_center_contacts.html

Cisco Firmware Downloads

www.cisco.com/go/smallbizfirmware

Select a link to download firmware for Cisco products. No login is required.

Cisco Open Source Requests

www.cisco.com/go/smallbiz_opensource_request

Product Documentation

Cisco 220 Series

https://www.cisco.com/c/en/us/products/switches/business-220-series-smart-switches/index.html

Warranty Information

www.cisco.com/go/warranty

Regulatory Compliance and Safety Information

www.cisco.com/en/US/docs/switches/lan/csb_switching_general/rcsi/Switch_ClassA_RCSI.pdf

Cisco Small Business

Cisco Partner Central (Partner Login Required)

www.cisco.com/web/partners/sell/smb

Cisco Small Business Home

www.cisco.com/smb