The Selector section of a policy begins with the keyword SELECTOR and concludes with the keyword END. Selector sections are evaluated to determine which loaded policy will be used.
The Selector sections of all the currently-loaded policies are run to determine which policy has the greatest weight. When evaluated, the section returns a weight between 0-100, where 0 means do not use this policy, 1-99 means use this policy if no other policy returns a higher value, and 100 means use this policy.
The result of a Selector section is given in a RETURN declaration. If no RETURN declaration is made, a default value of 0 will be returned. The following is a sample Selector section:
SELECTOR
RETURN 49;
END
When the Selector sections of multiple policies are evaluated, more than one policy might return the same value. In this case, it is indeterminate which policy will be selected. All else being equal, a server policy will override a WAN policy.
For more information on writing declarations, see Constructions Used within Policy Sections. See also Provider Section.