Classifying DHCP Subscribers with the C-Web Interface
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:
The Dhcp Classifier pane appears.
- From the Create new list, select Rule.
- Type a name for the new rule in the dialog box, and click OK.
The rule appears in the side pane and the Rule pane.
- Enter a script or a target as described in the Help text in the Main pane, and click OK.
- To configure a condition for a target,
- Type the DHCP classification condition name as described in DHCP Classification Conditions, and click OK.
The condition appears in the side pane and the Condition pane.
DHCP Classification Conditions
DHCP classification conditions define match criteria that are used to find the DHCP profile. Use the fields in this section to define DHCP classification conditions.
authVirtualRouterName
- Name of JUNOSe virtual router that is set by an authorization plug-in through the authorization response.
- Value—Name of the virtual router in the format vrname@hostname
dhcp
- DHCP options. See Setting DHCP Parameters with DHCP Options.
dhcpProfileDN
interfaceName
- Name of the interface where the DHCP discover message was received.
- Value—Name of the interface in your router CLI syntax
- Example—interfaceName=fastEthernet6/0
ifAlias
- Description of the interface where the DHCP discover request was received.
- Value—Interface description that is configured on the router. For JUNOSe routers, it is the description configured with the interface description command
- Example—ifAlias="dhcp-subscriber12"
ifDesc
- Alternate name for the interface where the DHCP discover request was received. This is a system-generated name that is used by SNMP.
- Value
ip<slot>/<port>.<subinterface>On the JUNOS routing platform, ifDesc is the same as interfaceName. macAddress
- MAC address of the DHCP client that appears in DHCP request.
- Value—Valid MAC address
- Example—macAddress="00:11:22:33:44:55"
nasPortId
- Port identifier of an interface.
- Value—Includes interface name and additional layer 2 information
- Example—nasPortId="fastEthernet 3/1" (There is a space between fastEthernet and slot number 3/1 in the nasPortId.)
poolName
- IP address pool name that is set by an authorization plug-in through the authorization response.
- Value—Name of an address pool configured on the JUNOSe router
virtualRouterName
DHCP Classification Targets
The target of the DHCP classification script uses a syntax similar to an LDAP URL. With the exception of baseDN, all fields are optional. The syntax is:
baseDN [ ? [ attributes ] [ ? [ scope ] [ ? [ filter ] ] ] ]
- baseDN—DN of object where search starts.
- attributes—Comma-separated list of properties, in the format attribute=<-value->, that allow you to set specific attributes for directory objects that the script finds; see DHCP Classification Conditions.
You can use the attribute configuration to override attributes in the directory. For example, to override the IP pool name that is stored in the DHCP profile with the pool name that the authorization plug-in sends, use the attribute statement radiusFramedPool=<-poolName->.