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

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

27-Web Cache重定向命令

本章节下载 27-Web Cache重定向命令  (99.58 KB)

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

27-Web Cache重定向命令


1 Web Cache重定向配置命令

仅S3600-EI系列以太网交换机支持Web Cache重定向功能。

 

1.1  Web Cache重定向配置命令

1.1.1  display webcache

【命令】

display webcache

【视图】

任意视图

【参数】

【描述】

display webcache命令用来显示Web Cache重定向功能的参数设置和状态信息。

【举例】

# 显示Web Cache重定向功能的参数设置和状态信息。

<Sysname> display webcache

 webcache IP address: 1.1.1.1

 webcache MAC address: 0012-0990-2250

 webcache port: Ethernet1/0/1

 webcache VLAN: 1

 webcache TCP port: 80

 webcache redirect VLAN:

     VLAN 2 Valid

     VLAN 3 Invalid

 webcache status: accessible

表1-1 display webcache命令显示信息描述表

字段

描述

webcache IP address

Web Cache Server的IP地址

webcache MAC address

Web Cache Server的MAC地址

webcache port

Web Cache Server连接的端口

webcache VLAN

Web Cache Server所属的VLAN

webcache TCP port

HTTP报文使用的TCP端口号

webcache redirect VLAN

重定向VLAN,即这些VLAN内的HTTP报文将被重定向到Web Cache Server,重定向VLAN的状态有以下两种:

l      Valid:表示此重定向VLAN生效

l      Invalid:表示此重定向VLAN没有生效

webcache status

Web Cache重定向功能的状态,包括以下几种:

Disable:重定向功能没有开启

Enable but no detection:重定向功能开启,但是没有启动 Web cache 探测

Enable and detecting:重定向功能开启,且正在探测  Web cache 设备

Enable but hardware not support:重定向功能开启但硬件不支持

Enable but detection fail:重定向功能开启,但探测Web cache 设备失败

Redirection OK:重定向功能开启,且探测到 Web cache 设备,重定向功能正常

 

1.1.2  webcache address

【命令】

系统视图下的命令形式:

webcache address ip-address mac mac-address vlan vlan-id port interface-type interface-number [ tcpport tcpport-number ]

undo webcache all

以太网端口视图下的命令形式:

webcache address ip-address mac mac-address vlan vlan-id [ tcpport tcpport-number ]

【视图】

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

【参数】

ip-address:Web Cache Server的IP地址。

mac-address:Web Cache Server的MAC地址。

vlan-id:Web Cache Server所属VLAN的ID。

port interface-type interface-number:交换机和Web Cache Server相连接的端口,interface-type interface-number为端口类型和端口编号。

tcpport tcpport-number:HTTP报文使用的TCP端口号,缺省值为80。

【描述】

webcache address命令用来配置Web Cache Server的相关参数。undo webcache all命令用来取消交换机上所有Web Cache重定向的配置。

缺省情况下,没有配置Web Cache Server的相关参数。

用户可以在系统视图下配置Web Cache Server的相关参数,也可以在以太网端口视图下配置Web Cache Server的相关参数,两者的配置效果相同。配置Web Cache Server的相关参数后,还必须配置重定向VLAN,Web Cache重定向功能才能生效。

需要注意的是:

l              如果配置的Web Cache Server路由不可达,Web Cache重定向功能将不能生效。

l              交换机只支持配置一个Web Cache Server。如果再次配置Web Cache Server,新配置的Web Cache Server将替代原有的配置。

l              Web Cache Server所属的VLAN虚接口必须处于up状态,否则Web Cache重定向功能将不能生效。

l              如果同时配置了Web Cache重定向功能和STP功能,为了避免Web Cache重定向功能失效,建议用户将交换机上连接Web Cache Server的端口配置为Trunk或Hybrid端口,并且配置此端口允许用户访问Internet报文时所用的VLAN通过。

【举例】

# 在系统视图下启动Web Cache重定向功能,配置Web Cache Server的IP地址为1.1.1.1、MAC地址为0012-0990-2250、所属的VLAN为40、与交换机相连的端口为Ethernet 1/0/4、HTTP报文使用的TCP端口号为缺省值80。

<Sysname> system-view

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

[Sysname] webcache address 1.1.1.1 mac 0012-0990-2250 vlan 40 port Ethernet 1/0/4

# 在与Web Cache Server相连的以太网端口Ethernet 1/0/4下启动Web Cache重定向功能,配置Web Cache Server的IP地址为1.1.1.1、MAC地址为0012-0990-2250、所属的VLAN为40、HTTP报文使用的TCP端口号为缺省值80。

<Sysname> system-view

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

[Sysname] interface Ethernet 1/0/4

[Sysname-Ethernet1/0/4] webcache address 1.1.1.1 mac 0012-0990-2250 vlan 40

1.1.3  webcache redirect-vlan

【命令】

webcache redirect-vlan vlan-id

undo webcache redirect-vlan [ vlan-id ]

【视图】

系统视图

【参数】

vlan-id:重定向VLAN的VLAN ID。

【描述】

webcache redirect-vlan命令用来为Web Cache重定向功能配置重定向VLAN,即将指定VLAN内的HTTP报文重定向到Web Cache Server。undo webcache redirect-vlan命令用来删除为Web Cache重定向功能配置的重定向VLAN。

缺省情况下,所有VLAN内的HTTP报文都不会重定向到Web Cache Server。

需要注意的是:

l              在配置某一VLAN为重定向VLAN之前,必须先创建该VLAN的虚接口,否则配置不能成功。

l              用户可以反复执行webcache redirect-vlan命令来配置多个重定向VLAN,Web Cache重定向功能最多支持配置8个重定向VLAN。

l              如果在删除重定向VLAN时不输入vlan-id参数,将会删除配置的所有重定向VLAN。

l              重定向VLAN的虚接口必须处于up状态,否则Web Cache重定向功能将不能生效。

l              交换机不支持将Web Cache Server所属的VLAN配置为重定向VLAN。

【举例】

# 配置VLAN 40为重定向VLAN,将VLAN 40内的HTTP报文重定向到Web Cache Server。

<Sysname> system-view

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

[Sysname] webcache redirect-vlan 40

 

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

新华三官网
联系我们