ltm rule command BWC policy
iRule(1) BIG-IP TMSH Manual iRule(1)
BWC::policy
The bwc irule allows a bwc policy to be attached or detached to a specific flow. The bwc irule is the
equivalent of the rateclass iRule (rateclass ) command but specific to bwc rate control.
SYNOPSIS
BWC::policy ('attach' | 'detach') POLICY_NAME (SESSION_ID)?
DESCRIPTION
A bwc policy must exist for the given policy name, the irule will return an error if the policy cannot be
found. The policy name should be give without a path name: e.g. "gold_user" not "/Common/gold_user". The irule
will internally try to determine the correct pathname through lookup_folder_path_obj().
Once the irule has found the correct bwc policy name, it will know if the policy is static or dynamic. If the
policy is dynamic a third arg session is required. The session is used as the bwc_cookie_t argument to the bwc
public api bwc_dynamic_policy_instantiate(). The provided session string will be internally converted to a
bwc_cookie_t. Any given sessions which create a duplicate bwc_cookie_t are not handled internally by the bwc
public api's, so duplicate cookie's map to the same dynamic policy.
The argument is only valid for dynamic policy. As such the static policy must not supply any
arg when attaching.
RETURN VALUE
VALID DURING
EXAMPLES
Attach a static policy to a flow:
ltm rule test_bwc {
when CLIENT_ACCEPTED {
BWC::policy attach gold_class
}
}
Attach a dynamic policy gold_user to a flow, session is combination of client address and port:
ltm rule test_bwc {
when CLIENT_ACCEPTED {
set mycookie [IP::remote_addr]:[TCP::remote_port]
BWC::policy attach gold_user $mycookie
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.3.0 --First introduced the command.
BIG-IP 2020-06-23 iRule(1)