• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C S3100-UM[S3100-SI(UM)]系列以太网交换机 命令手册-Release 22XX系列-6W101

19-Web认证命令

本章节下载  (219.52 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S3100/S3100-SI(UM)/Command/Command_Manual/H3C_S3100-SI(UM)-Release_22XX-6W101/201108/722203_30005_0.htm

19-Web认证命令


1 Web认证配置命令

目前,本系列交换机中,仅S3100-26TP-UM以太网交换机支持Web认证配置命令。

 

1.1  Web认证配置命令

1.1.1  display web-authentication configuration

【命令】

display web-authentication configuration

【视图】

任意视图

【参数】

【描述】

display web-authentication configuration 显示Web认证的所有配置,包括全局配置和端口下的配置。

【举例】

# 显示Web认证的配置信息。

<Sysname> display web-authentication configuration

Status: disabled

 Protocol: HTTP

 Web Server:

 Idle-cut time: 900 sec

 Max-online time: 1800 sec

 Max-connection of device is: 512

 Customized authentication-page information :

     Corp-Name:

     Platform-Name:

     Phone-Num:

     Email-address:

     File:

 Free IP:

 Free User:

 Interface Configuration:

 Interface_number         method        max-connection

表1-1 display web-authentication configuration命令显示信息描述表

字段

描述

Status

Web认证功能的全局状态

Protocol

Web认证的接入协议(HTTP、HTTPS)

Web Server

Web认证服务器的IP地址和端口号

Idle-cut time

闲置用户检测的时间间隔

Max-online time

限制用户在线最长时间

Max-connection of device

设备上Web认证用户最大个数

Customized authentication-page information

认证页面的各部分定制参数,共分为5个部分:分别是公司名称,主题介绍,联系电话,电子邮件信息或者定制的Web文件

Free IP

免认证IP地址段

Free User

免认证用户

Interface Configuration

选择Web认证功能的端口配置信息

Interface_number

端口编号

method

端口上用户的接入方式(shared、designated、extended)

max-connection

端口上允许连接用户的最大数

 

1.1.2  display web-authentication connection

【命令】

display web-authentication connection { all | interface interface-type interface-number | user-name user-name }

【视图】

任意视图

【参数】

all:显示所有的在线用户。

interface-type interface-number:端口编号。

user-name:用户名,长度为1~184的字符串。

【描述】

display web-authentication connection用于显示在线用户信息。

【举例】

# 显示Web认证在线用户信息。

<Sysname> display web-authentication connection all

Username: 1

MAC: 000d-88f6-44c1   Interface: Ethernet1/0/1

VLAN: 2               Method: Shared

State: ONLINE         Online-Time(s): 8

 

Total 1 connection(s) matched

表1-2 display web-authentication connection命令显示信息描述表

字段

描述

Username

接入用户的用户名

MAC

接入用户的MAC地址

Interface

用户接入的端口

VLAN

用户所属VLAN

Method

用户接入方式(shared、designated、extended)

State

用户状态

Online-Time(s)

用户在线时间

 

1.1.3  web-authentication customize

【命令】

web-authentication customize { corp-name corporation-text | email email-string | phone-num phonenum-string | platform-name platform-text | file web-file }

undo web-authentication customize { corp-name | email | phone-num | platform-name | all | file }

【视图】

系统视图

【参数】

corp-name:设置Web认证定制页面的公司名称。

corporation-text: 用户定制“公司名称”项的字符串,长度为1~64,可以包含空格。

email:设置Web认证定制页面的电子邮件。

email-string: 用户定制“电子邮件”项的字符串,长度为1~64,如果包含空格,需要使用双引号。

phone-num:设置Web认证定制页面的联系电话。

phonenum-string用户定制“联系电话”项的字符串,长度为1~32,如果包含空格,需要使用双引号。

platform-name:设置Web认证定制页面的主题介绍。

platform-text用户定制“主题介绍”项的字符串,长度为1~128,可以包含空格。

file:指定定制的Web文件。

web-file指定定制的Web文件名,长度为1~142的字符串。

all:应用undo命令恢复缺省情况时,选择此项,表示将所有定制项目恢复为缺省情况。

【描述】

web-authentication customize命令用于配置认证页面的各部分定制参数:公司名称、主题介绍、联系电话、电子邮件信息,以及指定定制的Web页面文件,设置这些定制参数后,在认证页面,认证成功页面等所有Web认证推出的页面上显示出相关定制信息。undo web-authentication customize用于恢复缺省情况。

缺省情况下,认证页面不体现定制信息。

【举例】

# 设置Web认证定制页面:

l              corp-name设置为:H3C Technologies

l              email设置为:service@h3c.com

l              phone-num设置为:+86-571-86760000

l              platform-name设置为:A leading global supplier of IP-based products and solutions

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] web-authentication customize corp-name H3C Technologies

[Sysname] web-authentication customize email service@h3c.com

[Sysname] web-authentication customize phone-num +86-571-86760000

[Sysname] web-authentication customize platform-name A leading global supplier of IP-based products and solutions

定制页面完成后,Web认证时的界面信息会包含如下内容,如下图所示。

图1-1 Web认证定制页面

 

1.1.4  web-authentication cut connection

【命令】

web-authentication cut connection { all | mac mac-address | user-name user-name | interface interface-type interface-number }

【视图】

系统视图

【参数】

all:强制所有的在线用户下线。

mac-address:强制此MAC地址对应的用户下线。

user-name:强制此用户名对应的用户下线,长度为1~184的字符串。

interface-type interface-number:指定接口类型和接口编号,强制此端口下的所有用户下线。

【描述】

web-authentication cut connection命令用来强制所有或者指定用户下线。

【举例】

# 强制Ethernet1/0/2端口下的所有用户下线。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] web-authentication cut connection interface Ethernet1/0/2

1.1.5  web-authentication domain

【命令】

web-authentication domain domain-name

undo web-authentication domain

【视图】

以太网端口视图

【参数】

domain-name:ISP认证域名,为1~128个字符的字符串。

【描述】

web-authentication domain命令用来配置端口上Web认证用户的认证域。undo web-authentication domain命令用来删除该端口上Web认证用户的认证域。

缺省情况下,未定义Web认证用户的认证域。

需要注意的是:

l              指定端口上接入的Web认证用户将按照如下先后顺序选择认证域:端口上配置的Web认证用户的认证域-->用户名中指定的ISP域-->系统缺省的ISP域。

l              端口上配置的Web认证用户的认证域必须已经存在。

【举例】

# 在以太网端口Ethernet1/0/1上配置Web认证用户使用认证域my-domain。

<Sysname> system-view

[Sysname] interface ethernet 1/0/1

[Sysname-Ethernet1/0/1] web-authentication domain my-domain

1.1.6  web-authentication enable

【命令】

web-authentication enable

undo web-authentication enable

【视图】

系统视图

【参数】

【描述】

web-authentication enable命令用于开启全局Web认证功能。undo web-authentication enable命令用于关闭全局Web认证功能。

【举例】

# 开启全局的Web认证特性。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] web-authentication web-server ip 192.168.0.56 port 80

[Sysname] web-authentication enable

1.1.7  web-authentication free-ip

【命令】

web-authentication free-ip ip-address { mask-length | mask }

undo web-authentication free-ip { ip-address { mask-length | mask } | all }

【视图】

系统视图

【参数】

ip-address:免认证IP地址。

mask-length:免认证IP的掩码长度。长度为1~32。

mask:免认证IP的掩码地址。

all:所有免认证IP地址。

【描述】

web-authentication free-ip命令用来设置Web认证的免认证IP地址段,即不通过Web认证就可以访问的IP地址段。undo web-authentication free-ip命令用来取消Web认证的免认证IP地址。

缺省情况下,未配置Web认证的免认证IP地址段。

l    所配置免认证地址段中不能包括Web认证服务器地址。

l    目前,设备最多可以配置十六个免认证网段。

 

【举例】

# 设置Web认证时的免认证IP地址段为10.1.1.0,掩码为24位。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] web-authentication free-ip 10.1.1.0 24

1.1.8  web-authentication free-user interface

【命令】

以太网端口视图:

web-authentication free-user ip ip-address mac mac-address

undo web-authentication free-user ip ip-address mac mac-addres

系统视图:

web-authentication free-user ip ip-address mac mac-address [ interface interface-list ]

undo web-authentication free-user { ip ip-address mac mac-address [ interface interface-list ] | all }

【视图】

以太网端口视图/系统视图

【缺省级别】

2:系统级

【参数】

ip ip-address:免认证用户的IP地址。

mac mac-address:免认证用户的MAC地址,格式为含分隔符“-”的MAC地址。

interface interface-list:免认证用户的以太网端口列表,表示多个以太网端口,表示方式为interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>。其中,interface-type为端口类型,interface-number为端口号。&<1-10>表示前面的参数最多可以输入10次。起始端口类型必须和终止端口类型一致,并且终止端口号必须大于起始端口号。

all:删除所有端口的免认证用户。

【描述】

web-authentication free-user用于在指定端口或所有端口上配置免认证用户。undo web-authentication free-user命令用来删除指定端口或所有端口上配置的免认证用户。

缺省情况下,没有配置Web认证的免认证用户。

需要注意的是:

l              在系统视图下使用该命令时,如果不输入可选项interface interface-list,则表示开启全局的Web免认证特性;如果指定了interface interface-list,则表示开启指定端口的Web免认证特性。

l              在以太网端口视图下使用该命令时,不能指定参数interface-list,只能开启当前端口的Web免认证特性。

【举例】

# 系统视图下,配置端口GigabitEthernet1/0/2上的免认证用户。

<Sysname> system-view

[Sysname] web-authentication free-user ip 100.1.1.10 mac 0015-e943-9fcf interface GigabitEthernet 1/0/2

1.1.9  web-authentication max-connection

【命令】

web-authentication max-connection number

undo web-authentication max-connection

【视图】

系统视图/端口视图

【参数】

number:最大上线用户个数。

【描述】

web-authentication max-connection命令用于配置设备或者一个端口上能通过Web认证的用户最大个数,当认证用户个数达到最大值时,此设备或者端口连接的其他用户就不能再通过Web认证。

此功能在端口视图下配置时,只能在共享接入方式或扩展接入方式的端口上配置。

缺省情况下,端口上能通过Web认证的用户最大个数为128,设备上最大用户个数为512。

【举例】

# 配置端口Ethernet1/0/1上Web认证用户最大个数为100。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] web-authentication select method shared

[Sysname-Ethernet1/0/1] web-authentication max-connection 100

1.1.10  web-authentication move-mode

【命令】

web-authentication move-mode { auto | secure }

undo web-authentication move-mode

【视图】

系统视图

【参数】

auto:Web认证用户采用自动迁移模式。开启该模式后,当已通过Web认证的用户在接入设备的相同VLAN,不同端口间发生迁移时,交换机将自动进行用户认证信息的迁移处理,保持用户的认证状态,不需要用户重新进行Web认证。

secure:Web认证用户采用安全迁移模式。开启该模式后,当已通过Web认证的用户在接入设备的不同端口间发生迁移时,用户必须重新发起Web认证请求。Web认证成功,交换机将在新端口建立用户连接,将原来的端口连接信息删除;如果用户认证失败,则不能在新端口建立连接,但原端口上的用户仍保持在线状态。

【描述】

web-authentication move-mode命令用来配置Web认证用户的迁移模式。undo web-authentication move-mode命令用来恢复Web认证用户的迁移模式为缺省情况。

缺省情况下,Web认证用户的迁移模式为安全模式。

需要注意的是:自动迁移模式只支持Web认证用户在相同VLAN内的迁移。如果接入设备配置了Web认证自动迁移模式,那么在不同VLAN间发生迁移的Web认证用户,将不能在新端口建立连接,但原端口上的用户仍保持在线状态。

【举例】

# 配置Web认证用户的迁移模式为自动模式。

<Sysname> system-view

[Sysname] web-authentication move-mode auto

1.1.11  web-authentication protocol

【命令】

web-authentication protocol { http | https server-policy policy-name }

undo web-authentication protocol

【视图】

系统视图

【参数】

http:客户端通过HTTP方式访问认证页面,该方式下认证信息未加密。

https:客户端通过HTTPS方式访问认证页面,认证信息在传输过程中被加密。

policy-name:指定SSL服务器策略名,该策略必须已经存在,字符串,长度为1~16。

【描述】

web-authentication protocol命令用于配置Web认证的接入协议,缺省为HTTP方式,如果选择为HTTPS方式则客户端和设备间的认证信息可以通过密文方式传递。

web-authentication protocol命令用于恢复缺省情况。

缺省情况下客户端与交换机之间采用HTTP协议交互。

需要注意的是:

l              此配置需要在Web认证开启前完成,Web认证开启后不能改变接入协议。

l              配置HTTPS方式之前,需要先配置SSL服务器策略,并且保证SSL策略对应的PKI域已经获取到了证书。

l              SSL策略内容更改后,需要重新开启Web认证功能才可以使用更新后的SSL策略。

l              SSL只支持SSL 3.0和TLS 1.0,不支持SSL 2.0版本。

l              配置HTTPS方式后,客户端需要使用HTTP1.1版本登录,否则页面打开速度会很慢。

【举例】

# 配置Web认证接入方式为HTTPS方式,SSL服务器策略为pt_ssl

<Sysname> system-view

[Sysname] web-authentication protocol https server-policy pt_ssl

1.1.12  web-authentication select method

【命令】

web-authentication select method { shared | designated | extended }

undo web-authentication select

【视图】

端口视图

【参数】

shared:设置端口Web认证采用共享接入方式。

designated:设置端口Web认证采用指定接入方式。

extended:设置端口Web认证采用扩展接入方式。

【描述】

web-authentication select命令用于在端口上开启Web认证,并设置端口的接入方式。undo web-authentication select命令用于在端口上关闭Web认证。

接入方式分为三种:共享方式、指定方式和扩展方式。

l              如果选择共享接入方式,则允许有多个用户在该端口上通过Web认证;

l              如果选择指定接入方式,则只允许一个用户在该端口上通过Web认证。

l              如果选择扩展接入方式,则允许有多个用户在hybrid端口上通过Web认证。

如果全局已开启Web认证,配置此命令后,在相应端口开启Web认证功能,即只有通过认证才能通过该端口正常访问网络;如果全局未开启Web认证,则只保存配置。

如果端口已经加入到某个汇聚组中,则禁止在该端口上开启Web认证。

 

【举例】

# 开启以太网端口Ethernet 1/0/1上的Web认证特性,采用端口共享接入方式。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet1/0/1] web-authentication select method shared

1.1.13  web-authentication timer idle-cut

【命令】

web-authentication timer idle-cut timer

undo web-authentication timer idle-cut

【视图】

系统视图

【参数】

timer:对在线用户是否为零流量进行检测的时间间隔,取值范围为10~86400,单位为秒。如果取值为0,则表示不会启用闲置用户检测功能。

【描述】

web-authentication timer idle-cut命令用来设置Web认证闲置用户检测的时间间隔。undo web-authentication timer idle-cut命令用来恢复缺省值。

缺省情况下,Web认证闲置用户检测的时间间隔为900秒。

闲置用户检测的时间间隔是系统定期检测用户是否闲置的时间间隔,如果检测到零流量时相应MAC地址表项未老化,则用户保持在线,如果MAC地址老化,则切断用户连接。建议将此时间设置为1/2 MAC地址老化时间到MAC地址老化时间之间的值。

 

【举例】

# 设置闲置用户检测时间为500s。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] web-authentication timer idle-cut 500

1.1.14  web-authentication timer max-online

【命令】

web-authentication timer max-online timer

undo web-authentication timer max-online

【视图】

系统视图

【参数】

timer:允许在线用户的最长在线时间,取值范围为10~86400,单位为秒。如果设置为0,则表示不限制用户最长在线时间。

【描述】

web-authentication timer max-online命令用来设置在线用户最长在线时间,如果用户在设定的最长在线时间内没有主动下线,交换机会将该用户强制下线。undo web-authentication timer max-online命令用来恢复缺省值。

缺省情况下,限制用户最长在线时间为1800秒。

【举例】

# 限制用户最长在线时间为36000秒。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] web-authentication timer max-online 36000

1.1.15  web-authentication web-proxy port

【命令】

web-authentication web-proxy port port-number

undo web-authentication web-proxy port { port-number | all }

【视图】

系统视图

【参数】

web-proxy port port-number:指定通过代理服务器进行Web认证的端口号,取值范围为1~65535。

all删除所有通过代理服务器进行Web认证的用户配置的Web认证端口号。

【描述】

web-authentication web-proxy port命令用来配置通过代理服务器进行Web认证的端口号。undo web-authentication web-proxy port命令用来删除通过代理服务器进行Web认证的端口号。

缺省情况下,没有配置通过代理服务器进行Web认证的端口号。

需要注意的是:

l              目前,系统最多支持配置8个通过代理服务器进行Web认证的端口号。

l              通过此命令配置的Web认证端口号,不能与通过web-authentication web-server ip ip-address port port-number 命令配置的端口号相同,否则将出现错误提示,配置不成功。

【举例】

# 配置通过代理服务器进行Web认证的端口号为8080。

<Sysname> system-view

[Sysname] web-authentication web-proxy port 8080

1.1.16  web-authentication web-server

【命令】

web-authentication web-server ip ip-address [ port port-number ]

undo web-authentication web-server

【视图】

系统视图

【参数】

ip-address:Web认证服务器的IP地址。必须为合法的单播地址。

port-number:Web认证服务器的端口号,取值范围为1~50000,缺省值为80。

【描述】

web-authentication web-server ip命令用于设置Web认证服务器的IP地址和端口号,客户端可以通过此服务器地址进行Web认证。undo web-authentication web-server命令用于恢复缺省设置。

缺省情况下,端口号为80,未配置Web认证服务器IP地址。

开启全局Web认证功能前,首先必须配置Web认证服务器的IP地址。

 

【举例】

# 设置Web认证服务器的IP地址为192.168.0.56、端口号为80。

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] web-authentication web-server ip 192.168.0.56 port 80

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们