?????? : 思科 500 系列高速缓存引擎

排除故障WCCP 透明缓存

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2014 年 9 月 22 日) | 反馈


目录


简介

当您使用WCCP实现透明缓存时,本文为WEB缓存通信协议(WCCP)排除故障提供一个基本框架。

先决条件

要求

本文档没有任何特定的要求。

使用的组件

本文档中的信息根据这些设备:

  • 有管理引擎1和多层交换机特性卡(MSFC)的运行思科IOS�软件的1思科Catalyst 6500

    在6500的软件版本是Cisco IOS软件版本12.1(8a)EX (c6sup11-jsv-mz.121-8a.EX.bin)。

  • 运行版本2.51的思科550高速缓存引擎

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 要查找本文档所用命令的其他信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用以下网络设置:

/image/gif/paws/9250/tshoot_wccp_9250-A.gif

配置

一好方法,当您安装Cache Engine时将配置必要仅的命令做WCCP工作。您能添加其它特性,例如路由器和客户端重定向列表的验证,以后。

在缓存/内容引擎,请指定路由器的IP地址和您要使用WCCP的版本。

wccp router-list 1 192.168.15.1 
wccp web-cache router-list-num 1
wccp version 2

在路由器上,请激活功能并且指定重定向的端口。缓存的识别自动地发生。

ip wccp web-cache 

!--- This is global configuration mode.


interface Vlan100 
 ip address 172.17.241.97 255.255.255.0 
 ip wccp web-cache redirect out 

!--- This is interface configuration mode.

应用在您在路径要截断客户端HTTP数据包到真正的网络服务器的接口的ip wccp web-cache redirect out命令。此接口典型地是给公司互联网服务提供商带来您的接口。此接口不需要是您安装您的缓存的接口。

一旦WCCP是活跃的,路由器在WCCP数据包的所有端口侦听。Cache Engine不断地发送“在这里我”数据包对有一配置在发信号Cache Engine在线状态的路由器列表的IP地址。如果正确地设置一切,路由器获取并且安装缓存。发出show ip wccp命令查看配置。

Router# show ip wccp
Global WCCP information: 
    Router information: 
        Router Identifier:         192.168.15.1 
        Protocol Version:          2.0 

    Service Identifier: web-cache 
        Number of Cache Engines:      1 
        Number of routers:            1 
        Total Packets Redirected:     0 
        Redirect access-list:         -none- 
        Total Packets Denied Redirect:  0 
        Total Packets Unassigned:     0 
        Group access-list:            -none- 
        Total Messages Denied to Group:      0 
        Total Authentication failures:       0

路由器标识符是缓存引擎看到路由器的IP地址。此地址不一定是重定向的数据流使用到达缓存的路由器接口。show ip wccp web-cache detail命令提供关于缓存的细节。

Router# show ip wccp web-cache detail 
WCCP Cache-Engine information: 
        
        IP Address:            192.168.15.2 
        Protocol Version:      2.0 
        State:                 Usable 
        Redirection:           GRE 
        Initial Hash Info:     FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC 
                               FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 
        Assigned Hash Info:    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 
                               FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 
        Hash Allotment:        256 (100.00%) 
        Packets Redirected:    0 
        Connect Time:          00:02:49

Redirection字段代表重定向从路由器的数据包到Cache Engine协议的种类。此协议可以是通用路由封装(GRE)或Layer2 (L2)。使用GRE, GRE数据包封装数据包。使用L2,数据包发送直通到缓存,但是设备必须是L2-adjacent。

哈希分配是哈希桶数量有分配的到此缓存。十六进制也代表与最初的哈希资讯台分配的哈希资讯台的哈希分配。散列算法允许所有可能的目标地址互联网地址集和划分在一定数量的桶的。每个缓存在缓存的集群或者组中,接收百分比此套桶。WCCP根据负载和一些其他情况动态地管理此数量。如果只安装一个缓存,此缓存很可能接收有分配的所有桶到缓存。

当路由器开始数据包的重定向对Cache Engine时,您看到在Total Packets Redirected字段的编号增加。

Router# show ip wccp 
Global WCCP information: 
    Router information: 
        Router Identifier:          192.168.15.1 
        Protocol Version:            2.0 

    Service Identifier: web-cache 
        Number of Cache Engines:           1
        Number of routers:                 1 
        Total Packets Redirected:  37 
        Redirect access-list:            -none- 
        Total Packets Denied Redirect:       0 
        Total Packets Unassigned:           12 
        Group access-list:                -none- 
        Total Messages Denied to Group:      0 
        Total Authentication failures:       0 

未分配的信息包总数是数据包数量没有重定向由于缺乏分配到所有缓存。在缓存期间,初始发现此重定向失败能发生。在缓存删除期间,失败能为一个小间隔也发生。

如果路由器不获取缓存,请调试WCCP活动。每当路由器接收“此处我是”从缓存的数据包,路由器应答与“我看到您”数据包。调试报告此活动。可用的调试指令是debug ip wccp eventsdebug ip wccp packets

如果采取在路由器的调试,在您启动缓存后,这是结果:

Router# debug ip wccp event 
WCCP events debugging is on 
Router# debug ip wccp packet 
WCCP packet info debugging is on 
Router# 
2d18h: WCCP-EVNT:S00: Built new router view: 0 routers, 0 usable web caches, change 
 # 00000001 
2d18h: %SYS-5-CONFIG_I: Configured from console by console 
2d18h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000001 
2d18h: WCCP-EVNT:S00: Redirect_Assignment packet from 192.168.15.2 fails source check 
2d18h: %WCCP-5-SERVICEFOUND: Service web-cache acquired on Web Cache 192.168.15.2 
2d18h: WCCP-PKT:S00: Received valid Here_I_Ampacket from 192.168.15.2 w/rcv_id 00000001 
2d18h: WCCP-EVNT:S00: Built new router view: 1 routers, 1 usable web caches, change 
 # 00000002 
2d18h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000002 
2d18h: WCCP-EVNT:S00: Built new router view: 1 routers, 1 usable web caches, change 
 # 00000002 
2d18h: WCCP-PKT:S00: Received valid Redirect_Assignment packet from 192.168.15.2 w/rcv_id 
 00000002 
2d18h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000003 
2d18h: WCCP-EVNT:S00: Built new router view: 1 routers, 1 usable web caches, change 
 # 00000002 
2d18h: WCCP-PKT:S00: Received valid Redirect_Assignment packet from 192.168.15.2 w/rcv_id 
 00000003 
2d18h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000004 
2d18h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000005 
2d18h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000006 
2d18h: WCCP-EVNT:S00: Built new router view: 1 routers, 1 usable web caches, change 
 # 00000002 
2d18h: WCCP-PKT:S00: Received valid Redirect_Assignment packet from 192.168.15.2 w/rcv_id 
 00000006

要增加级别调试,请跟踪IP数据包流量证实路由器是否收到从Cache Engine的数据包。然而,您不要杀害在生产环境的一个路由器,并且您只要显示关注数据流。所以,请使用访问控制表(ACL)仅限制调试到有缓存IP地址作为来源的数据包。

access-list 130 permit ip host 192.168.15.2 host 192.168.15.1  

Router# debug ip wccp event 
WCCP events debugging is on 
Router# debug ip wccp packet 
WCCP packet info debugging is on 
Router# debug ip packet 130 
IP packet debugging is on for access list 130 
2d19h: WCCP-EVNT:S00: Built new router view: 1 routers, 1 usable web caches, change 
 # 00000002 
2d19h: WCCP-PKT:S00: Received valid Redirect_Assignment packet from 192.168.15.2 
 w/rcv_id 0000001B 
2d19h: datagramsize=174, IP 18390: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 160, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 0000001C 
2d19h: datagramsize=174, IP 18392: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 160, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 0000001D 
2d19h: datagramsize=174, IP 18394: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 160, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 0000001E 
2d19h: datagramsize=378, IP 18398: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 364, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-EVNT:S00: Built new router view: 1 routers, 1 usable web caches, change 
 # 00000002 
2d19h: WCCP-PKT:S00: Received valid Redirect_Assignment packet from 192.168.15.2 
 w/rcv_id 0000001E 
2d19h: datagramsize=174, IP 18402: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 160, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 0000001F 
2d19h: datagramsize=174, IP 18404: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 160, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000020 
2d19h: datagramsize=174, IP 18406: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 160, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000021 
2d19h: datagramsize=378, IP 18410: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 364, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-EVNT:S00: Built new router view: 1 routers, 1 usable web caches, change 
 # 00000002 
2d19h: WCCP-PKT:S00: Received valid Redirect_Assignment packet from 192.168.15.2 
 w/rcv_id 00000021 
2d19h: datagramsize=174, IP 18414: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 160, fragment 0, fo 0, rcvd 3 
2d19h: WCCP-PKT:S00: Sending I_See_You packet to 192.168.15.2 w/ rcv_id 00000022 
2d19h: datagramsize=174, IP 18416: s=192.168.15.2 (Vlan300), d=192.168.15.1 (Vlan300), 
 totlen 160, fragment 0, fo 0, rcvd 3 

如果路由器不看到缓存或WCCP活动,请检查基本连通性。设法ping从路由器或路由器的缓存从缓存。如果ping工作,请验证配置正确。

如果缓存获得发生,但是没有数据包重定向,请验证流量实际上到达路由器。并且,请验证流量转发对您发出ip wccp web-cache redirect out命令的接口。切记那,与流量的拦截和重定向,流量去TCP端口80。

如果缓存获得发生,并且看到数据包的重定向,但是您的客户端不能浏览互联网,请检查缓存连接到互联网和给您的客户端。然后,请在互联网里设法ping从缓存到多种IP地址和到你的一些客户端。如果ping去完全合格的域(URL)而不是IP地址,请务必使用的域名系统(DNS)服务器在缓存配置里的您指定。

如果不是肯定的,如果缓存处理请求或没有,您能调试HTTP活动在缓存。首先,您必须限制流量,以便您不杀害缓存。在路由器上,请创建与客户端的源IP地址的ACL,并且请使用global命令ip wccp网站缓存的redirect-list选项。

Router(config)# access-list 50 permit 10.10.10.152 
Router(config)# ip wccp web-cache redirect-list 50

其次,请在缓存发出debug http all all命令激活HTTP调试。然后,请发出term mon命令激活终端的监控,并且设法浏览从该的客户端的一个站点您配置在ACL。示例命令输出如下:

Cache# debug http all trace 
Cache# clear cache 
Clear cache initiated 
Clear cache complete 
irq0#cework_readfirstdata() Start the recv: 0xb820a80 len 4096 timeout 0x3a98 ms ctx 
 0xb87d280 
cework_recvurl() Start the request: 0xb20c800 0xb20c838 0xb20c8e0 
Http Request headers received from client: 
GET / HTTP/1.1 
Host: 172.17.241.126 
User-Agent: Links (0.92; Linux 2.2.19 i686) 
Accept: */* 
Accept-Charset: us-ascii, ISO-8859-1, ISO-8859-2, ISO-8859-4, ISO-8895-5, ISO-8859-13, 
 windows-1250, windows-1251, windows-1257, cp437, cp850, cp852, cp866, x-cp866-u, 
 x-mac-ce, x-kam-cs, x-koi8-r, x-koi8-u, utf-8 
Connection: Keep-Alive 

Protocol dispatch: mode=1 proto=2 
ValidateCode() Begin: pRequest=0xb20c800 
Proxy: CACHE_MISS: HealProcessUserRequest 
cework_teefile() 0xb20c800: Try to connect to server: CheckProxyServerOut(): 
 Outgoing proxy is not enabled: 0xb20c800 (F) 
GetServerSocket(): Forwarding to server: pHost = 172.17.241.126, Port = 80 
HttpServerConnectCallBack : Connect call back socket = 268055136, error = 0 
Http request headers sent to server: 
GET / HTTP/1.1 
Host: 172.17.241.126 
User-Agent: Links (0.92; Linux 2.2.19 i686) 
Accept: */* 
Accept-Charset: us-ascii, ISO-8859-1, ISO-8859-2, ISO-8859-4, ISO-8895-5, ISO-8859-13, 
 windows-1250, windows-1251, windows-1257, cp437, cp850, cp852, cp866, x-cp866-u, 
 x-mac-ce, x-kam-cs, x-koi8-r, x-koi8-u, utf-8 
Connection: keep-alive 
Via: 1.1 irq0 
X-Forwarded-For: 10.10.10.152 

cework_sendrequest: lBytesRemote = 383, nLength = 383 (0xb20c800) 
ReadResCharRecvCallback():  lBytesRemote = 1815, nLength = 1432 0xb20c800) 
IsResponseCacheable() OBJECTSIZE_IS_UNLIMITED, lContentLength = 3195 
cework_processresponse() : 0xb20c800 is cacheable 
Http response headers received from server: 
HTTP/1.1 200 OK 
Date: Mon, 19 Nov 2001 19:26:06 GMT 
Server: Apache/1.3.12 (Unix)  (Red Hat/Linux) mod_ssl/2.6.6 
 OpenSSL/0.9.5a mod_perl/1.24 
Last-Modified: Fri, 12 Oct 2001 12:45:30 GMT 
ETag: "5d63-c7b-3bc6e5ea" 
Accept-Ranges: bytes 
Content-Length: 3195 
Keep-Alive: timeout=15, max=100 
Connection: Keep-Alive 
Content-Type: text/html 

GetUpdateCode(): GET request from client, GET request to server. 
GetUpdateCode(): nRequestType = -1 
SetTChain() 0xb20c800: CACHE_OBJECT_CLIENT_OBJECT sendobj_and_cache 
Http response headers sent to client: 
HTTP/1.1 200 OK 
Date: Mon, 19 Nov 2001 19:26:06 GMT 
Server: Apache/1.3.12 (Unix)  (Red Hat/Linux) mod_ssl/2.6.6 
 OpenSSL/0.9.5a mod_perl/1.24 
Last-Modified: Fri, 12 Oct 2001 12:45:30 GMT 
ETag: "5d63-c7b-3bc6e5ea" 
Content-Length: 3195 
Keep-Alive: timeout=15, max=100 
Content-Type: text/html 
Connection: keep-alive 

cework_tee_sendheaders() 0xb20c800: sent 323 bytes to client 
cework_tee_send_zbuf() 0xb20c800: Send 1087 bytes to client (1087) 
UseContentLength(): Valid Content-Length (T) 
cework_tee_recv_zbuf() 0xb20c800: Register to recv 2108 bytes timeout 120 sec 
HttpServerRecvCallBack(): Recv Call Back socket 268055136, err 0, length 2108 
HttpServerRecvCallBack(): lBytesRemote = 3923, nLength = 2108 (186697728) 
cework_tee_send_zbuf() 0xb20c800: Send 2108 bytes to client (2108) 
UseContentLength(): Valid Content-Length (T) 
cework_setstats(): lBytesLocal = 0, lBytesRemote = 3923 (0xb20c800) 
cework_readfirstdata() Start the recv: 0xb820c00 len 4096 timeout 0x3a98 
 ms ctx 0xb87d280 
cework_cleanup_final() End the request: 0xb20c800 0xb20c838 0xb20c8e0 

因此缓存不应答直接地给客户端以某以前的负荷内容,您能清除Cache Engine的缓存。发出cache命令的结算黑体文本选定在调试的相关信息。这些是网页处理的不同的相位:

  1. HTTP请求报头收据从客户端的

  2. HTTP请求报头发送对服务器的

  3. HTTP响应报头收据从服务器的

  4. HTTP响应报头发送对客户端的

如果您浏览的网页包含多个对象,您看到上一个顺序的多个实例。请尽可能简单地总是保持调试过程。

如果问题持续,并且需要进一步协助,您能此问题向思科技术支持报告

从路由器,请收集此信息提供给思科技术支持

  • 输出show tech命令

    您能替代show running-configshow version输出命令的输出是否有与show tech命令输出的大小的某个严重的困难。

  • 输出show ip wccp命令

  • 输出show ip wccp web-cache detail命令

  • debug ip wccp eventsdebug ip wccp packets的输出发出命令,如果需要,

    此debug输出是必要的看起来是否似乎与通信的一问题路由器和Web缓存之间。在问题的出现期间,收集输出。

仅从Cisco缓存引擎,请收集此信息提供给思科技术支持

  • 输出show tech命令

当您与思科技术支持联系时,准备好对:

  • 提供问题的一清楚说明

    包括回答问题例如:

    • 什么是症状?

    • 问题是否一直或者偶尔地发生?

    • 问题开始是否发生在若干配置更改以后?

    • 思科是否是或第三方缓存在使用中的?

  • 若可能提供受影响的拓扑的一清楚说明,图表

  • 提供可帮助解决问题的其他信息

示例命令输出如下:

*********************************** Router Configuration ************************ 

Router# show running 
Building configuration... 

Current configuration : 4231 bytes 
! 
version 12.1 
service timestamps debug uptime 
service timestamps log uptime 
no service password-encryption 
! 
hostname Router 
! 
boot buffersize 126968 
boot bootldr bootflash:c6msfc-boot-mz.120-7.XE1 
! 
redundancy 
 main-cpu 
  auto-sync standard 
ip subnet-zero 
ip wccp web-cache 
! 
! 
! 
interface FastEthernet3/1 
 no ip address 
 switchport 
 switchport access vlan 100 
 switchport mode access 
! 
interface FastEthernet3/2 
 no ip address 
 switchport 
 switchport access vlan 200 
 switchport mode access 
! 
interface FastEthernet3/3 
 no ip address 
 switchport 
 switchport access vlan 300 
 switchport mode access 
! 
interface FastEthernet3/4 
 no ip address 
! 
interface FastEthernet3/5 
 no ip address 
 shutdown 
! 
interface FastEthernet3/6 
 no ip address 
 shutdown 
! 
interface FastEthernet3/7 
 no ip address 
 shutdown 
! 
interface FastEthernet3/8 
 no ip address 
 shutdown 
! 
interface FastEthernet3/9 
 no ip address 
 shutdown 
! 
interface FastEthernet3/10 
 no ip address 
 shutdown 
! 
interface FastEthernet3/11 
 no ip address 
 shutdown 
! 
interface FastEthernet3/12 
 no ip address 
 shutdown 
! 
interface Vlan1 
 no ip address 
 shutdown 
! 
interface Vlan100 
 ip address 172.17.241.97 255.255.255.0 
 ip wccp web-cache redirect out 
! 
interface Vlan200 
 ip address 10.10.10.120 255.255.255.0 
! 
interface Vlan300 
 ip address 192.168.15.1 255.255.255.0 
! 
ip classless 
ip route 0.0.0.0 0.0.0.0 172.17.241.1 
no ip http server 
! 
access-list 30 permit 192.168.15.2 
! 
! 
line con 0 
 exec-timeout 0 0 
line vty 0 4 
 login 
 transport input lat pad mop telnet rlogin udptn nasi 
! 
end 
  

*********************************** Cache Configuration ************************ 

Cache# show running 

Building configuration... 
Current configuration: 
! 
! 
logging disk /local/syslog.txt debug 
! 
user add admin uid 0  capability admin-access 
! 
! 
! 
hostname Cache 
! 
interface ethernet 0 
 ip address 192.168.15.2 255.255.255.0 
 ip broadcast-address 192.168.15.255 
 exit 
! 
interface ethernet 1 
 exit 
! 
ip default-gateway 192.168.15.1 
ip name-server 172.17.247.195 
ip domain-name cisco.com 
ip route 0.0.0.0 0.0.0.0 192.168.15.1 
cron file /local/etc/crontab 
! 
wccp router-list 1 192.168.15.1 
wccp web-cache router-list-num 1 
wccp version 2 
! 
authentication login local enable 
authentication configuration local enable 
rule no-cache url-regex .*cgi-bin.* 
rule no-cache url-regex .*aw-cgi.* 
! 
! 
end 

验证

当前没有可用于此配置的验证过程。

故障排除

目前没有针对此配置的故障排除信息。

相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


相关信息


Document ID: 9250