NAME: wccp2_forwarding_method
TYPE: wccp2_method
LOC: Config.Wccp2.forwarding_method
-DEFAULT: gre
+DEFAULT: gre_hash
IFDEF: USE_WCCPv2
DOC_START
WCCP2 allows the setting of forwarding methods between the
router/switch and the cache. Valid values are as follows:
- gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
- l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
+ gre_hash - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
+ l2_mask - 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.
NAME: wccp2_return_method
TYPE: wccp2_method
LOC: Config.Wccp2.return_method
-DEFAULT: gre
+DEFAULT: gre_hash
IFDEF: USE_WCCPv2
DOC_START
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:
- gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
- l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
+ gre_hash - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
+ l2_mask - 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.
DOC_END
NAME: wccp2_assignment_method
-TYPE: int
+TYPE: wccp2_method
LOC: Config.Wccp2.assignment_method
-DEFAULT: 1
+DEFAULT: gre_hash
IFDEF: USE_WCCPv2
DOC_START
WCCP2 allows the setting of methods to assign the WCCP hash
Valid values are as follows:
- 1 - Hash assignment
- 2 - Mask assignment
+ gre_hash - Hash assignment
+ l2_mask - Mask assignment
As a general rule, cisco routers support the hash assignment method
and cisco switches support the mask assignment method.
#define WCCP2_CAPABILITY_ASSIGNMENT_METHOD 0x02
#define WCCP2_CAPABILITY_RETURN_METHOD 0x03
-#define WCCP2_FORWARDING_METHOD_GRE 0x00000001
-#define WCCP2_FORWARDING_METHOD_L2 0x00000002
+#define WCCP2_METHOD_GRE 0x00000001
+#define WCCP2_METHOD_L2 0x00000002
-#define WCCP2_ASSIGNMENT_METHOD_HASH 0x00000001
-#define WCCP2_ASSIGNMENT_METHOD_MASK 0x00000002
+#define WCCP2_FORWARDING_METHOD_GRE WCCP2_METHOD_GRE
+#define WCCP2_FORWARDING_METHOD_L2 WCCP2_METHOD_L2
-#define WCCP2_PACKET_RETURN_METHOD_GRE 0x00000001
-#define WCCP2_PACKET_RETURN_METHOD_L2 0x00000002
+#define WCCP2_ASSIGNMENT_METHOD_HASH WCCP2_METHOD_GRE
+#define WCCP2_ASSIGNMENT_METHOD_MASK WCCP2_METHOD_L2
+
+#define WCCP2_PACKET_RETURN_METHOD_GRE WCCP2_METHOD_GRE
+#define WCCP2_PACKET_RETURN_METHOD_L2 WCCP2_METHOD_L2
#define WCCP2_HASH_ASSIGNMENT 0x00
#define WCCP2_MASK_ASSIGNMENT 0x01
/**
* Parse wccp2_return_method and wccp2_forwarding_method options
- * they can be '1' aka 'gre' or '2' aka 'l2'
+ * they can be '1' aka 'gre_hash' or '2' aka 'l2_mask'
* repesenting the integer numeric of the same.
*/
void
/* Snarf the method */
if ((t = strtok(NULL, w_space)) == NULL) {
- debugs(80, 0, "wccp2_*_method: missing setting. Expected: gre or l2");
+ debugs(80, DBG_CRITICAL, "wccp2_*_method: missing setting.");
self_destruct();
}
/* update configuration if its valid */
- if (strcmp(t, "gre") == 0 || strcmp(t, "1") == 0) {
- *method = 1;
- } else if (strcmp(t, "l2") == 0 || strcmp(t, "2") == 0) {
- *method = 2;
+ if (strcmp(t, "gre_hash") == 0 || strcmp(t, "1") == 0) {
+ *method = WCCP2_METHOD_GRE;
+ } else if (strcmp(t, "l2_mask") == 0 || strcmp(t, "2") == 0) {
+ *method = WCCP2_METHOD_L2;
} else {
- debugs(80, 0, "wccp2_*_method: unknown setting. Expected: gre or l2, (got " << t << ")");
+ debugs(80, DBG_CRITICAL, "wccp2_*_method: unknown setting, got " << t );
self_destruct();
}
}
switch(v)
{
case 1:
- storeAppendPrintf(e, "%s gre\n", label);
+ storeAppendPrintf(e, "%s gre_hash\n", label);
break;
case 2:
- storeAppendPrintf(e, "%s l2\n", label);
+ storeAppendPrintf(e, "%s l2_mask\n", label);
break;
default:
- debugs(80, DBG_CRITICAL, "FATAL: WCCPv2 confifigured method (" << v << ") is not valid.");
+ debugs(80, DBG_CRITICAL, "FATAL: WCCPv2 configured method (" << v << ") is not valid.");
self_destruct();
}
}