Menu

YfiTechAttributes

Anonymous

RADIUS Attributes

In YFi there are profiles specifying attributes for a user.
These attributes are part of the RADIUS protocol and can be categorised in three categories.

Category
Example
Description

Check
User-Name
The username trying to connect. Sent from the NAS (e.g CoovaChilli) to the RADIUS server

Reply
Session-Timeout
The amount of time a user is allowed to spend on the network. Sent from RADIUS to NAS (e.g. CoovaChilli)

Internal (Usually Check)
Yfi-Time
An attribute which is used specific inside FreeRADIUS


Counters

There are some counters specified under /usr/local/etc/raddb/rlm_perl_modules/sqlcounter.conf. See the following as an example:

sqlcounter time_daily {
        counter-name = Daily-Session-Time
        check-name = Max-Daily-Session
        reply-name = Session-Timeout
        sqlmod-inst = sql
        key = User-Name
        reset = daily
        query = "SELECT SUM(acctsessiontime - GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)) FROM radacct WHERE username = '%{%k}' AND UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'"
}
  • To implement this counter we will specify a check attribute of Max-Daily-Session and specify how much time a user can spend daily on the network.
  • The counter will then return to the NAS a reply of Session-Timeout to enforce this limitation.

Using Counters in combination with Yfi-Time

  • We can use a counter in combination with the special Yfi-Time attribute.

  • Yfi-Time is a special attribute that is reset monthly and specific to YFi Permanent users.

  • To limit a permanent user per day you should use the Max-Daily-Session in combination with Yfi-Time and / or Yfi-Data.

  • If you want to only limit a permanent user daily, simply assign a large value to Yfi-Time and use Max-Daily-Session.

  • The feedback will then be something like the following:

        Session-Timeout
        120
        ChilliSpot-Bandwidth-Max-Down
        12500
        Yfi-Time
        "500000"
        ChilliSpot-Bandwidth-Max-Up
        12500
    
  • As you can see Yfi-Time and Max-Daily-Session can co-exists to create a flexible set-up.


Related

Wiki: Home