Attribute Usage

Attributes are used in order to process and set configuration items for incoming connections. Each attribute has a Name, Operator and Value.

Specify the type of attribute to be used. If you need to specify a vendor attribute, use the following format:

[vendor_code:vendor_attribute_name]

How to use the value of this attribute. See the OPERATORS file for details on each supported operator.

Value of the attribute (string).

Example:

// Sets the users traffic limit to 5GB
Name: SMRadius-Capping-Traffic-Limit Operator: := Value: 5000

Non-standard Core Attributes

A listing of non standard attributes and their functions in SMRadius. These attributes are listed under the areas in SMRadius that make use of them.

Core

Evaluate and set an attribute / attributes based on the results of the evaluation. Syntax: TEST CASE ? TRUE_ATTRIBUTE : FALSE.

Lets take a real life example:

1. For traffic under 80000Mbyte, we set an attribute

SMRadius-Evaluate ||+= SMRadius_Capping_TotalDataUsage < 80000 ? [14988:Mikrotik-Rate-Limit] = 1m/4m 1m/6m 1m/5m 10/10 1

2. For traffic above 80000Mbyte, but below 130000Mbyte, we set the same attribute to something else…

SMRadius-Evaluate ||+= SMRadius_Capping_TotalDataUsage > 80000 && SMRadius_Capping_TotalDataUsage < 130000 ? [14988:Mikrotik-Rate-Limit] = 512k/1m 640k/2m 640k/2m 10/10 4

3. For traffic above 130000Mbyte, we set the traffic to a third different value…

SMRadius-Evaluate ||+= SMRadius_Capping_TotalDataUsage > 130000 ? [14988:Mikrotik-Rate-Limit] = 128k/384k 512k/1024k 256k/512k 10/10 8

Allows the admin to specify an address that the peer address must match in order to be authorized. The user / group attribute SMRadius-Peer-Address will be checked against the peer address of the client device.

SMRadius-Peer-Address  ==  <peer address>

Allows one to build web ui's that ignore topups, this attribute is not used internally.

Work in Progress

Transforms a username from the supplied username to the configured username.

# Transfrom user@example.net to user@this.example.net
SMRadius-Username-Transform  :=  example.net=this.example.net