Description

This article provides information on how to implement the functionality of the Web Cache Communication Protocol, which is not supported as a feature on EX devices, via filter based forwarding.

Symptoms

Web Cache Communication Protocol (WCCP) is a Cisco developed content-routing protocol that provides a mechanism to redirect traffic flows in real-time. It has built-in load balancing, scaling, fault tolerance, and service-assurance (failsafe) mechanisms.

Solution


Topology :

alt

Configuration :

In this setup for vlan10 , filter based forwarding is configured to redirect HTTP traffic to the proxy server at 20.20.20.2 .

Setting up a firewall :
user@switch# show firewall
family inet {
  filter test {
     term 1 {
        from { 
           protocol tcp;
             source-port http;
        }
        then {
        routing-instance instance_test; }
     }
     term default {
        then accept;
     }
  }
}
In this firewall, term1 is defined to forward HTTP traffic to the instance_test routing instance.

Routing-instance configuration :
switch@juniper# show routing-instances

instance_test {
      routing-options {
         static {
               route 0.0.0.0/0 next-hop 20.20.20.2;
         }
      }
}
Under the routing instance, a default route is defined that points to the proxy server at 20.20.20.2 .

Applying the filter :
user@switch# show interfaces vlan.10

family inet {
       filter {
          input test;
       }
       address 10.10.10.1/24;
}
The filter is applied as an input to vlan.10 , so that all of vlan.10 traffic is redirected to the instance_test routing instance.