Squid configuration (2)

Source: Internet
Author: User

Concept of WCCP protocol:

WCCP: Web Cache Communication Protocol)

This protocol allows a vro to communicate with your cache server. They talk about what type of communication the vro should intercept and reboot to the cache through a gre tunnel. WCCP version 2 supports identity recognition and other security measures, and supports multiple routers, cache routers, and many protocols. Therefore, in addition to www HTTP, you can also cache file servers and other types.

The working principle of WCCP is that when a user accesses a page, WCCP caches and retains these pages. When the user requests webpage data next time, the router sends the user's request to the engine, if there is a backup of the same web page in the cache, it will be directly sent to the user from the cache to improve the speed; but if not, it will re-request the remote web page and then send it to the user.

This is a good way to improve the Intranet cache hit and reduce the egress bandwidth when routing and caching are used together;

For more information about the protocol, see Baidu encyclopedia http://baike.baidu.com/view/769914.htm.

Configurations related to squid and WCCP

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

 
Http_port 80 transparentwccp2_router 218.206.114.161wccp2 _ forwarding_method 2wccp2_return_method 2wccp2_assignment_method 2wccp2_service standard 0

Http_port 80 transparent

Set squid to listen to port 80,Transparent mode, no browser configuration required

Wccp2_router 218.206.114.161

A vro has multiple interfaces. Check the IP address of the interface connected to squid. This is necessary because
The WCCP message of the router. Set the source IP address to the address of the outbound interface. If the source address does not match wccp_router
Value. Squid rejects the WCCP message.

Wccp2_forwarding_method 2

Wccp2 allows the setting of forwarding methods between
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
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
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 random Sive. 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.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.