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

H3C S3600系列以太网交换机 命令手册-Release 1602(V1.02)

20-Web认证命令

本章节下载 20-Web认证命令  (143.28 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S3600/S3600-EI/Command/Command_Manual/H3C_S3600_Release_1602_CM(V1.02)/200906/637668_30005_0.htm

20-Web认证命令


1 Web认证配置命令

1.1  Web认证配置命令

1.1.1  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

1.1.2  web-authentication enable

【命令】

web-authentication enable

undo web-authentication enable

【视图】

系统视图

【参数】

【描述】

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

如果启动了802.1x、MAC地址认证、端口安全、端口汇聚、IRF等特性,则不能开启Web认证功能。反之,如果开启Web认证功能,则禁止启用802.1x、MAC地址认证、端口安全、端口汇聚、IRF等特性。

 

【举例】

# 开启全局的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.3  web-authentication select method

【命令】

web-authentication select method { shared | designated }

undo web-authentication select

【视图】

端口视图

【参数】

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

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

【描述】

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

接入方式分为两种:共享方式和指定方式。

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

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

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

l    如果端口不是access类型端口,则禁止在该端口上开启Web认证。

l    如果端口已经加入到某个汇聚组中,则禁止在该端口上开启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.4  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的掩码地址。

【描述】

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.5  web-authentication free-user

【命令】

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

undo web-authentication free-user { ip ip-address mac mac-address | all }

【视图】

系统视图

【参数】

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

mac-address:免认证用户的MAC地址,格式为含分隔符“-”的MAC地址,例如“000d-88f6-44c1”。

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

【描述】

web-authentication free-user命令用于配置Web认证的免认证用户。允许源MAC和源IP与免认证用户的MAC和IP地址都相同的用户不用通过Web认证就能正常访问网络。undo web-authentication free-user命令用于取消Web认证的免认证用户配置。

缺省情况下,未配置免认证用户。

l    最多可以配置8个免认证用户。

l    对于共享接入方式(shared)上线的用户,如果配置的免认证用户的IP地址和MAC地址和在线用户的IP地址和MAC地址都相同时,对应的用户被强制下线。

 

【举例】

# 设置Web认证的免认证用户IP地址为192.168.0.108,MAC地址为0010-0020-0030。

<Sysname> system-view

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

[Sysname] web-authentication free-user ip 192.168.0.108 mac 0010-0020-0030

1.1.6  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命令用来强制所有或者指定用户下线。

【举例】

# 强制Ethernet 1/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.7  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.8  web-authentication max-connection

【命令】

web-authentication max-connection number

undo web-authentication max-connection

【视图】

端口视图

【参数】

number:端口最大上线用户个数,取值范围为1~128。

【描述】

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

此功能只能在共享接入方式端口上配置。

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

【举例】

# 配置端口1/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.9  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-1 display web-authentication connection命令显示信息描述表

字段

描述

Username

接入用户的用户名

MAC

接入用户的MAC地址

Interface

用户接入的端口

VLAN

用户所属VLAN

Method

用户接入方式(Shared、Designated)

State

用户状态

Online-Time(s)

用户在线时间

 

1.1.10  display web-authentication configuration

【命令】

display web-authentication configuration

【视图】

任意视图

【参数】

【描述】

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

【举例】

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

<Sysname> display web-authentication configuration

Status: enabled

 Web Server: IP=30.1.1.2        Port=80

 Idle-cut time: 900 sec

 Free IP:

           1) IP=10.1.1.0           Net Mask=255.255.255.0

 Free User:

           1) IP=192.168.0.108      MAC=000d-88f6-44c1

 Interface Configuration:

 Interface_number         method        max-connection

 Ethernet1/0/1            shared        128

 Ethernet1/0/14           shared        128

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

字段

描述

Status

WEB认证功能的全局状态

Web Server

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

Idle-cut time

闲置用户检测的时间间隔

Free IP

免认证IP地址段

Free User

免认证用户

Interface Configuration

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

Interface_number

端口编号

method

端口上用户的接入方式(Shared、Designated)

max-connection

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

 

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

新华三官网
联系我们