squid配置(之二)

WCCP协议的概念:

 WCCP:网页缓存通信协议 (Web Cache Communication Protocol)

 这个协议能让一台路由器与你的缓存服务器对话。它们谈论的是这台路由器应该拦截什么类型的通信并且通过一个 GRE 隧道重新引导到缓存。WCCP 第二版支持身份识别等安全措施,支持多台路由器、缓存路由器和许多协议。因此,除了 WWW HTTP 之外,你还可以做文件服务器和其它类型的缓存。
  WCCP的工作原理为每当用户访问一个页面时,WCCP就将这些页面进行缓存保留,当用户下次请求网页数据时,路由器将用户的请求发到引擎,如果缓存中有相同网页的备份,则直接从缓存中发给用户,提高速度;但是如果没有,就自己重新请求远程网页,然后再发给用户。

       这是在路由和缓存配合使用提高内网缓存命中,减少出口带宽很好的一个方法;

     具体协议解释参见百度百科http://baike.baidu.com/view/769914.htm

squid和wccp协议相关的配置

####################################

http_port 80 transparent
wccp2_router 218.206.114.161
wccp2_forwarding_method 2
wccp2_return_method 2
wccp2_assignment_method 2
wccp2_service standard 0

http_port 80 transparent

设置squid监听80端口,透明模式,无需浏览器配置

wccp2_router 218.206.114.161


路由器有多个接口。请确认使用与 squid 相连的接口的IP 地址。这点是必要的,因为来自
路由器的WCCP 消息,将源IP 地址设置为外出接口的地址。假如源地址不匹配wccp_router
值,squid 会拒绝WCCP 消息。

wccp2_forwarding_method 2


    WCCP2 allows the setting of forwarding methods between the
    router/switch and the cache.  Valid values are as follows:


    1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) 
    2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)

    Currently (as of IOS 12.4) cisco routers only support GRE.
    Cisco switches only support the L2 redirect assignment method. 


wccp2_return_method 2

 WCCP2 allows the setting of return methods between the
    router/switch and the cache for packets that the cache
    decides not to handle.  Valid values are as follows:


    1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) 
    2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)


    Currently (as of IOS 12.4) cisco routers only support GRE.
    Cisco switches only support the L2 redirect assignment.


    If the "ip wccp redirect exclude in" command has been
    enabled on the cache interface, then it is still safe for
    the proxy server to use a l2 redirect method even if this
    option is set to GRE.

wccp2_assignment_method 2

WCCP2 allows the setting of methods to assign the WCCP hash
    Valid values are as follows:


    1 - Hash assignment
    2 - Mask assignment


    As a general rule, cisco routers support the hash assignment method
    and cisco switches support the mask assignment method.


wccp2_service standard 0

WCCP2 allows for multiple traffic services. There are two
    types: "standard" and "dynamic". The standard type defines
    one service id - http (id 0). The dynamic service ids can be from
    51 to 255 inclusive.  In order to use a dynamic service id
    one must define the type of traffic to be redirected; this is done
    using the wccp2_service_info option.


    The "standard" type does not require a wccp2_service_info option,
    just specifying the service id will suffice.


    MD5 service authentication can be enabled by adding
    "password=<password>" to the end of this service declaration.

####################################
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值