sscontrol rule
Use the sscontrol rule command to configure rules.
Syntax
>>-sscontrol--rule--+-add--sitename+sn2+...+snN@rule+r2+...+rN--type--value--| value |--| opts |-+->< +-dropserver--sitename+sn2+...+snN@rule+r2+...+rN--server+s2+...+snN---------+ +-remove--sitename+sn2+...+snN@rule+r2+...+rN--------------------------------+ +-set--sitename+sn2+...+snN@rule+r2+...+rN--| value |--| opts |--------------+ +-status--sitename+sn2+...+snN@rule+r2+...+rN--------------------------------+ '-useserver--sitename+sn2+...+snN@rule+r2+...+rN--server+s2+...+snN----------' opts |--+---------------------------------+--------------------------| +-beginrange--low--endrange--high-+ +-priority--value-----------------+ '-metricname--value---------------'
Parameters
- add
- Add this rule to a site name.
- sitename An unresolvable hostname that the client will request. The site name must be a fully qualified domain name. Additional site names are separated by a plus sign (+).Note: An unresolvable hostname that the client will request. The site name must be a fully qualified domain name. Additional site names are separated by a plus sign (+).
- rule The name you choose for the rule. This name can contain any alphanumeric character, underscore, hyphen, or period. It can be from 1 to 20 characters and cannot contain any blanks.Note: An unresolvable hostname that the client will request. The site name must be a fully qualified domain name. Additional site names are separated by a plus sign (+).
- sitename
- type
- The type of rule.
- type Your choices for type are:
- ip
- The rule is based on the client IP address.
- metricall
- The rule is based on the current metric value for all the servers in the server set.
- metricavg
- The rule is based on the average of the current metric values for all the servers in the server set.
- time
- The rule is based on the time of day.
- true
- This rule is always true. Think of it as an else statement in programming logic.
- type
- beginrange
- The lower value in the range used to determine whether or not
the rule is true.
- low Depends on the type of rule. The kind of value and its default are listed here by the type of rule:
- ip
- The address of the client as either a symbolic name or in IP address format. The default is 0.0.0.0.
- time
- An integer. The default is 0, representing midnight.
- metricall
- An integer. The default is 100.
- metricavg
- An integer. The default is 100.
- low
- endrange
- The higher value in the range used to determine whether or not
the rule is true.
- high Depends on the type of rule. The kind of value and its default are listed here by the type of rule:
- ip
- The address of the client as either a symbolic name or in IP address format. The default is 255.255.255.254.
- time
- An integer. The default is 24, representing midnight.Note: When defining the beginrange and endrange of time intervals, note that each value must be an integer representing only the hour portion of the time; portions of an hour are not specified. For this reason, to specify a single hour—say, the hour between 3:00 and 4:00 am— you would specify a beginrange of 3 and an endrange also of 3. This will signify all the minutes beginning with 3:00 and ending with 3:59. Specifying a beginrange of 3 and an endrange of 4 would cover the two-hour period from 3:00 through 4:59.
- metricall
- An integer. The default is 2 to the 32nd power minus 1.
- metricavg
- An integer. The default is 2 to the 32nd power minus 1.
- high
- priority
- The order in which the rules are reviewed.
- status
- Show status of the servers.
- level
An integer. If you do not specify the priority of the first rule you add, Site Selector sets it by default to 1. When a subsequent rule is added, by default its priority is calculated to be 10 + the current lowest priority of any existing rule. For example, assume you have an existing rule whose priority is 30. You add a new rule and set its priority at 25 (which is a higher priority than 30). Then you add a third rule without setting a priority. The priority of the third rule is calculated to be 40 (30 + 10).
- level
- metricname
- Name of the metric measured for a rule.
- dropserver
- Remove a server from a rule set.
- serverThe IP address of the TCP server machine as either a symbolic name or in IP address format.Note: Additional site names are separated by a plus sign (+).
- server
- remove
- Remove one or more rules, separated from one another by plus signs.
- set
- Set values for this rule.
- status
- Display all the values of one or more rules.
- useserver
- Insert server into a rule set.
Samples
- To add a rule that will always be true, do not specify the beginning
range or end range:
sscontrol rule add sitename@rulename type true priority 100
- To create a rule forbidding access to a range of IP addresses,
in this case those beginning with “9”:
sscontrol rule add sitename@rulename type ip b 9.0.0.0 e 9.255.255.255
- To create a rule that will specify the use of a given server from
the hour of 11:00 a.m. through the hour of 3:00 p.m.:
sscontrol rule add sitename@rulename type time beginrange 11 endrange 14 sscontrol rule useserver sitename@rulename server05