|
|
The Web Cache Control Protocol feature transparently redirects HTTP requests from the intended server to a Cisco Cache Engine. When the Cisco Cache Engine receives the request, it attempts to service the request from its own cache. If the requested information is not present, the Cisco Cache Engine then makes a request to the web server to get the required information. After receiving the required information from the web server, the Cisco Cache Engine passes the information back to the client and possibly caches it to fill future requests.
Cisco IOS support of the Web Cache Control Protocol provides a transparent web cache solution. Users can benefit from web proxy caches without having to configure clients to contact a specific proxy server in order to access web resources. Many web proxy caches require clients to access web resources through a specific proxy web server rather than using the originally requested web server URL. With the Cisco Cache Director System, the clients send web requests to the desired web server URL. Cisco IOS routers intelligently intercept HTTP requests and transparently redirect clients to a Cisco Cache Engine.
Web caches reduce transmissions costs and the amount of time required to download web files. If a client requests a web page that is already cached, the request and data only have to travel between the Cisco Cache Engine and the client. Without a web cache, the request and reply must travel over the Internet or wide-area network.
When a Web Cache Control Protocol-enabled router receives an IP packet, the router determines if the packet is a request that should be directed to a Cisco Cache Engine. The router looks for TCP as the protocol field in the IP header and for 80 as the destination port in the TCP header. If the packet meets these criteria, it is encapsulated inside an additional IP envelope and redirected to a Cisco Cache Engine.
Cisco Cache Engines send keepalive messages to the router every ten seconds.
This feature is supported on these platforms:
To use the Web Cache Control Protocol, IP must be configured on the interface connected to the Internet and the interface connected to the Cisco Cache Engine.
The interface connected to the Cisco Cache Engine must be an Ethernet or Fast Ethernet interface.
To configure the Web Cache Control Protocol on the router, you must perform the following tasks. The first task is required, while the second is optional.
To enable an interface to redirect web traffic to the Cisco Cache Engine using the Web Cache Control Protocol, perform the following tasks beginning in global configuration mode:
To monitor the Web Cache Control Protocol, perform any of the following tasks in EXEC mode:
The show ip wccp and show ip wccp web-caches commands display a count of the number of packets redirected. Use the clear ip wccp EXEC command to clear this counter.
The following example configures a router to support the Web Cache Control Protocol and to redirect web-related packets from Ethernet interface 0 to the Cisco Cache Engine:
Router# configure terminal
Router(config)# ip wccp
Router(config)# interface Ethernet 0
Router(config-if)# ip web-cache redirect
Router(config-if)# end
Router#
%SYS-5-CONFIG_I: Configured from console by console.
Router# copy running-config startup-config
After the router has been configured, use the show ip wccp web-cache command to verify that Web Cache Control Protocol is enabled and aware of Cisco Cache Engines. In this example, the show ip wccp web-cache command is entered immediately after the router has been configured. After a few seconds, the cache engine becomes usable, as seen in the second output.
Router# show ip wccp web-cache WCCP Web-Cache information: IP Address: 192.168.51.102 Protocol Version: 0.3 State: NOT Usable Initial Hash Info: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Assigned Hash Info: 00000000000000000000000000000000 00000000000000000000000000000000 Hash Allotment: 0 (0.00%) Packets Redirected: 0 Connect Time: 00:00:06 Router# show ip wccp web-cache WCCP Web-Cache information: IP Address 192.168.51.102 Protocol Version: 0.3 State: Usable Initial Hash Info: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Assigned Hash Info: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Hash Allotment: 256 (100.00%) Packets Redirected: 0 Connect Time: 00:00:31
This section documents new or modified commands. All other commands used with this feature are documented in the Cisco IOS Release 11.1 command references.
To clear a router's counter of the number of packets redirected by the Web Cache Control Protocol, use the clear ip wccp EXEC command.
clear ip wccpThis command has no arguments or keywords.
EXEC
The "Packets Redirected" counts are displayed by the show ip wccp and show ip wccp web-caches commands.
The following example shows output from the show ip wccp web-caches command before and after the clear ip wccp command is used:
Router#show ip wccp web-cachesWCCP Web-Cache information: IP Address: 192.168.88.11 Protocol Version: 1.0 State: Usable Initial Hash Info: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Assigned Hash Info: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Hash Allotment: 256 (100.00%) Packets Redirected: 21345 Connect Time: 00:13:46 Router#clear ip wccpRouter#show ip wccp web-cachesWCCP Web-Cache information: IP Address: 192.168.88.11 Protocol Version: 1.0 State: Usable Initial Hash Info: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Assigned Hash Info: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Hash Allotment: 256 (100.00%) Packets Redirected: 0 Connect Time: 00:13:46
show ip wccp
show ip wccp web-caches
To enable the router to support the Web Cache Control Protocol, use the ip wccp global configuration command. The no form of this command disables support for the Web Cache Control Protocol.
ip wccpThis command has no arguments or keywords.
The Web Cache Control Protocol is disabled on the router.
Global configuration
This command and the ip web-cache redirect interface command are the only commands required to start redirecting requests to the Cisco Cache Engine using the Web Cache Control Protocol. To see if the Web Cache Control Protocol is enabled on the router, use the show ip wccp command.
When this command is enabled but the ip web-cache redirect command is disabled, the router is aware of caches but does not use them.
The following example configures a router to support the Web Cache Control Protocol and redirects web-related packets from Ethernet interface 0 to the Cisco Cache Engine:
Router# configure terminal Router(config)# ip wccp Router(config)# interface Ethernet 0 Router(config-if)# ip web-cache redirect Router(config-if)# end Router# %SYS-5-CONFIG_I: Configured from console by console.
ip web-cache redirect
show ip wccp
show ip wccp web-caches
To instruct an interface to check for appropriate outgoing packets and redirect them to a Cisco Cache Engine, use the ip web-cache redirect interface configuration command. The no form of this command disables the redirection of messages to the Cisco Cache Engine.
ip web-cache redirectThis command has no arguments or keywords.
The interface does not redirect messages to the Cisco Cache Engine.
Interface configuration
This command and the ip wccp interface command are the only commands required to start redirecting requests to the Cisco Cache Engine using the Web Cache Control Protocol.
The following example configures a router to support the Web Cache Control Protocol and redirects web-related packets from Ethernet interface 0 to the Cisco Cache Engine:
Router# configure terminal Router(config)# ip wccp Router(config)# interface Ethernet 0 Router(config-if)# ip web-cache redirect Router(config-if)# end Router# %SYS-5-CONFIG_I: Configured from console by console.
clear ip wccp
ip wccp
show ip interface
show ip wccp
show ip wccp web-caches
To display the usability status of interfaces configured for IP, use the show ip interface EXEC command.
show ip interface [type number]| type | (Optional) Interface type. |
| number | (Optional) Interface number. |
EXEC
The Cisco IOS software automatically enters a directly connected route in the routing table if the interface is usable. A usable interface is one through which the software can send and receive packets. If the software determines that an interface is not usable, it removes the directly connected routing entry from the routing table. Removing the entry allows the software to use dynamic routing protocols to determine backup routes to the network (if any).
If the interface can provide two-way communication, the line protocol is marked "up." If the interface hardware is usable, the interface is marked "up."
If you specify an optional interface type, you will see only information on that specific interface.
If you specify no optional arguments, you will see information on all the interfaces.
When an asynchronous interface is encapsulated with PPP or SLIP, IP fast switching is enabled. A show ip interface command on an asynchronous interface encapsulated with PPP or SLIP displays a message indicating that IP fast switching is enabled.
The following is sample output from the show ip interface command:
Router#show ip interfaceEthernet0 is up, line protocol is upInternet address is 192.195.78.24, subnet mask is 255.255.255.240Broadcast address is 255.255.255.255Address determined by non-volatile memoryMTU is 1500 bytesHelper address is not setSecondary address 131.192.115.2, subnet mask 255.255.255.0Directed broadcast forwarding is enabledMulticast groups joined: 224.0.0.1 224.0.0.2Outgoing access list is not setInbound access list is not setProxy ARP is enabledSecurity level is defaultSplit horizon is enabledICMP redirects are always sentICMP unreachables are always sentICMP mask replies are never sentIP fast switching is enabledIP fast switching on the same interface is disabledIP SSE switching is disabledRouter Discovery is disabledIP output packet accounting is disabledIP access violation accounting is disabledTCP/IP header compression is disabledProbe proxy name replies are disabledWeb Cache Redirect is enabled
Table 15 describes the fields shown in the display.
| Field | Description |
|---|---|
| Ethernet0 is up | If the interface hardware is usable, the interface is marked "up." For an interface to be usable, both the interface hardware and line protocol must be up. |
| line protocol is up | If the interface can provide two-way communication, the line protocol is marked "up." For an interface to be usable, both the interface hardware and line protocol must be up. |
| Broadcast address | Shows the broadcast address. |
| Address determined by... | Indicates how the IP address of the interface was determined. |
| MTU | Shows the MTU value set on the interface. |
| Helper address | Shows a helper address, if one has been set. |
| Secondary address | Shows a secondary address, if one has been set. |
| Directed broadcast forwarding | Indicates whether directed broadcast forwarding is enabled. |
| Multicast groups joined | Indicates the multicast groups this interface is a member of. |
| Outgoing access list | Indicates whether the interface has an outgoing access list set. |
| Inbound access list | Indicates whether the interface has an incoming access list set. |
| Proxy ARP | Indicates whether Proxy ARP is enabled for the interface. |
| Security level | Specifies the IPSO security level set for this interface. |
| ICMP redirects | Specifies whether redirects will be sent on this interface. |
| ICMP unreachables | Specifies whether unreachable messages will be sent on this interface. |
| ICMP mask replies | Specifies whether mask replies will be sent on this interface. |
| IP fast switching | Specifies whether fast switching has been enabled for this interface. It is generally enabled on serial interfaces, such as this one. |
| IP SSE switching | Specifies whether IP SSE switching is enabled. |
| Router Discovery | Specifies whether the discovery process has been enabled for this interface. It is generally disabled on serial interfaces. |
| IP output packet accounting | Specifies whether IP accounting is enabled for this interface and what the threshold (maximum number of entries) is. |
| TCP/IP header compression | Indicates whether compression is enabled or disabled. |
| Probe proxy name | Indicates whether HP Probe proxy name replies are generated. |
| Web Cache Redirect | Indicates whether HTTP packets are redirected to a Cisco Cache Engine. |
To display global statistics related to the Web Cache Control Protocol, use the show ip wccp EXEC command.
show ip wccpThis command has no arguments or keywords.
EXEC
Use the clear ip wccp command to reset the counter for the "Packets Redirected" information.
The following example shows sample show ip wccp output:
Router# show ip wccp
Global WCCP information:
Number of web-caches: 1
Total Packets Redirected: 21345
Table 16 describes fields shown in this example.
| Field | Description |
|---|---|
| Number of web-caches | Number of Cisco Cache Engines using the router as their home router. |
| Total Packets Redirected | Total number of packets redirected by the router. |
clear ip wccp
ip wccp
ip web-cache redirect
show ip interface
show ip wccp web-caches
To display information about the router's known Cisco Cache Engines, use the show ip wccp web-caches EXEC command.
show ip wccp web-cachesThis command has no arguments or keywords.
EXEC
Use the clear ip wccp command to reset the counter for the "Packets Redirected" information.
The following example shows sample show ip wccp web-caches output:
Router# show ip wccp web-caches
WCCP Web-Cache information:
IP Address: 192.168.88.11
Protocol Version: 1.0
State: Usable
Initial Hash Info: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Assigned Hash Info: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Hash Allotment: 256 (100.00%)
Packets Redirected: 21345
Connect Time: 00:13:46
Table 17 explains the fields shown in this display.
| Field | Description |
|---|---|
| IP Address | IP address of the Cisco Cache Engine. |
| Protocol Version | Version of the Web Cache Control Protocol the Cisco Cache Engine is running. |
| State | State of the Cisco Cache Engine. Possible values are "Usable" and "NOT Usable." |
| Initial Hash Info | Initial contents of the hash field. The hash field contains information about how the router intends to use the Cisco Cache Engine. |
| Assigned Hash Info | Current hash information of the Cisco Cache Engine. The hash information field contains information about how the router intends to use the Cisco Cache Engine. |
| Hash Allotment | Percentage of all possible web servers for which the router redirects HTTP requests to this Web cache. In this example, there is only one Cisco Cache Engine, so all HTTP requests are redirected to it. |
| Packets Redirected | Number of packets redirected to this Cisco Cache Engine. |
| Connect Time | Indicates how long the Cisco Cache Engine has used this router as its home router. |
clear ip wccp
ip wccp
ip web-cache redirect
show ip interface
show ip wccp
This section documents the following new debug commands:
Use the debug ip wccp events EXEC command to display information about significant Web Cache Control Protocol events. The no form of this command disables debugging output.
[no] debug ip wccp eventsFigure 3 shows sample debug ip wccp events output when a Cisco Cache Engine is added to the list of available Web caches.
Router# debug ip wccp events
WCCP-EVNT: Built I_See_You msg body w/1 usable web caches, change # 0000000A
WCCP-EVNT: Web Cache 192.168.25.3 added
WCCP-EVNT: Built I_See_You msg body w/2 usable web caches, change # 0000000B
WCCP-EVNT: Built I_See_You msg body w/2 usable web caches, change # 0000000C
Use the debug ip wccp packets EXEC command to display information about every Web Cache Control Protocol packet received or sent by the router. The no form of this command disables debugging output.
[no] debug ip wccp packetsFigure 4 shows sample debug ip wccp packets output. The router is sending keepalive packets to the Cisco Cache Engines at 192.168.25.4 and 192.168.25.3. Each keepalive packet has an identification number associated with it. When the Cisco Cache Engine receives a keepalive packet from the router, it sends a reply with the identification number back to the router.
Router# debug ip wccp packets WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.4 w/rcvd_id 00003532 WCCP-PKT: Sending I_See_You packet to 192.168.25.4 w/ rcvd_id 00003534 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.3 w/rcvd_id 00003533 WCCP-PKT: Sending I_See_You packet to 192.168.25.3 w/ rcvd_id 00003535 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.4 w/rcvd_id 00003534 WCCP-PKT: Sending I_See_You packet to 192.168.25.4 w/ rcvd_id 00003536 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.3 w/rcvd_id 00003535 WCCP-PKT: Sending I_See_You packet to 192.168.25.3 w/ rcvd_id 00003537 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.4 w/rcvd_id 00003536 WCCP-PKT: Sending I_See_You packet to 192.168.25.4 w/ rcvd_id 00003538 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.3 w/rcvd_id 00003537 WCCP-PKT: Sending I_See_You packet to 192.168.25.3 w/ rcvd_id 00003539
To use the Web Cache Control Protocol, the Cisco Cache Engine must be properly configured. Refer to the Using the Cisco Cache Director System documentation for the Cisco Cache Engine for details on configuring the Cisco Cache Engine. Keep these important points in mind:
|
|