ltm rule command BWC priorityΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



BWC::priority
       This command is used to create a priority class for a bwc policy.

SYNOPSIS
       BWC::priority (PRIORITY_CLASS   WEIGHT)
			     (PRIORITY_CLASS   WEIGHT)?
			     (PRIORITY_CLASS   WEIGHT)?
			     (PRIORITY_CLASS   WEIGHT)?

DESCRIPTION
       A BWC policy instance or category can be mapped to a priority class of
       a priority group. This is part of the configuration and can be done via
       tmsh or GUI. Once a BWC instance has these mappings we can use the
       iRule defined below to change those. The syntax for this iRule is like
       below,

       BWC::priority   [ ] [ ]
       [ ]

	   nameX - name of a priority class. valueX - weight of the priority class in percentage.

       In the above iRule you can specify one or more traffic classes and
       specify the desired weight-percentage for that priority-class. Please
       note that the weight-percentages are updated only for the BWC instance
       over which the iRule is being run. The policy continues to have the
       weight-percentage as configured by tmsh/GUI. Any new BWC instance will
       get the weight-percentage from the tmsh/GUI based configuration unless
       the new instance executed a BWC:priority iRule to override it.

RETURN VALUE
VALID DURING
EXAMPLES
	An example BWC::priority iRule. In this iRule we are setting the weight percentage of tg1->tc1 and tg1->tc2 to 60 and 40 respectively. Note that the BWC configuration has defined these weights to be 80 and 20. We are using iRules to override that and change it to 60 and 40.

	when SERVER_CONNECTED {

	    set my_policy bwc_policy set my_cat none set my_cookie [IP::remote_addr] switch -glob [TCP::remote_port] {
		"101" {
		    set my_cat c1
		}
		"102" {
		    set my_cat c2
		}
	    }
	    BWC::policy attach $my_policy $my_cookie if { $my_cat != "none" } {
		log local0. "BWC::color set $my_policy $my_cat" BWC::color set $my_policy $my_cat BWC::priority "tc1" 60 "tc2" 40
	    }
	}

	tmsh configuration:

	net bwc policy bwc_policy {

	    categories {
		c1 {
		    max-cat-rate 10mbps
		    traffic-priority-map tg1->tc1
		}
		c2 {
		    max-cat-rate 10mbps
		    traffic-priority-map tg1->tc2
		}
	    }
	    dynamic enabled log-publisher /Common/test_publisher max-rate 10mbps max-user-rate 10mbps
	}

	net bwc priority-group tg1 {

	    priority-classes {
		tc1 {
		    weight-percentage 80
		}
		tc2 {
		    weight-percentage 20
		}
	    }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-11.3.0 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)