Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Classifying DHCP Subscribers (SRC CLI)

    Use the following configuration statements to configure DHCP classification scripts:

    shared sae dhcp-classifier rule name{target target; }
    shared sae dhcp-classifier rule name condition name ...
    shared sae dhcp-classifier rule name {script-value; include include; }

    A classification script can contain either a target and a condition or a script. If you do not define a script, the classifier must have both a target and a condition.

    To configure DHCP classification scripts:

    1. From configuration mode, enter the DHCP classifier configuration. In this sample procedure, the classifier is configured in the east-region SAE group.
      user@host# edit shared sae group east-region dhcp-classifier
    2. Create a rule for the classifier. You can create multiple rules for the classifier.
      [edit shared sae group east-region dhcp-classifier]user@host# edit rule rule-1
    3. Configure either a target or a script for the rule.
      • Configure the target for the rule. If you configure a target, see Syntax for DHCP Classification Targets.
        [edit shared sae group east-region dhcp-classifier rule rule-1]user@host# set target target

        If you configured a target for the rule, you must configure a match condition for the rule. You can create multiple conditions for the rule. See DHCP Classification Conditions.

        [edit shared sae group east-region dhcp-classifier rule rule-1]user@host# edit condition name
      • Configure the script for the rule.
        [edit shared sae group east-region dhcp-classifier rule rule-1]user@host# edit script

        (Optional) You can specify a script target.

        [edit shared sae group east-region dhcp-classifier rule rule-1 script]user@host# set script-value

        (Optional) You can include a script that has already been created.

        [edit shared sae group east-region dhcp-classifier rule rule-1 script]user@host# set include include

        where include is a reference to an existing script that is included in the script you are configuring.

    4. (Optional) Change the order of rules.
      [edit shared sae group east-region dhcp-classifier]user@host# insert rule rule-5 before rule-4
    5. (Optional) Rename a rule.
      [edit shared sae group east-region dhcp-classifier]user@host# rename rule rule-2 to dhcp
    6. (Optional) Verify the classifier rule configuration.
      [edit shared sae group east-region dhcp-classifier rule rule-1]
      user@host# show 
      target cn=default,<-dhcpProfileDN->;
      condition {
       1;
      }
    7. (Optional) Verify the DHCP classifier configuration.
      [edit shared sae group east-region dhcp-classifier]
      user@host# show 
      rule rule-1 {
        script "# DHCP classification script
      #
      # The DHCP classification script can use the following fields:
      #
      # interfaceName          - interface where DHCP DISCOVER was received.
      # ifAlias                - \"ip description\" of interface
      # ifDesc                 - SNMP standard name of interface
      # nasPortId              
      # virtualRouterName      - VR where DHCP DISCOVER was received
      # macAddress             - MAC address of DHCP client
      # dhcp                   - DHCP options
      # poolName               - DHCP Pool name set by authorization plug-in
      # authVirtualRouterName  - VR name set by authorization plug-in
      # dhcpProfileDN          - search base for DHCP Profiles
      ";
      }
      rule rule-2 {
        target cn=default,<-dhcpProfileDN->;
        condition {
          1;
        }
      }

    Published: 2014-12-10