9 Managing Requests for Wholesale Accounts

This chapter describes how to use the Wholesale Module to manage requests for wholesale accounts.

Caution:

Only administrators with advanced RADIUS skills should attempt to implement custom configurations.

Before reading this chapter you should be familiar with:

About the Wholesale Module

The wholesale module can improve the performance of request processing for large wholesale accounts by dividing up account requests and sending them to subordinate accounts for processing. The wholesale module defines a wholesale account as a realm.

Specifying the Realm Attributes and Options

To configure the wholesale module, specify realm information in the Per Module section of the RADIUS config file.

  • To specify the name of the realm, use the Name entry.

  • To specify the attribute containing the realms, use the Attribute entry.

  • To specify the pattern for extracting the realm name from the attribute, use the Pattern entry.

Example

mod_wholesale {
   RealmAttributeOptions {
     name = realm1
     attribute = Class
     pattern = "WC=*@/Realm/@*"

     RealmInfo {
     realm-name = "ISP1"
     name-range = 500
     name-pattern = "ISP1%d"
  }
}

If we use this RealmAttributeOptions then an incoming request having the attribute Class=WC=*@ISP1@* will be routed to one the accounts ranging from ISP1 to ISP499.

In the MODULES section of the config file use the wholesale block to specify the realm attribute options.

wholesale {
   status = disabled
   type = mod_wholesale

   use-realm-attr-options = realm3

   add {
     AAA = User-Name
     Custom-Realm = %r
     Custom-User-Name = %u
     Custom-Type = "ISPXYZ"
     Custom-Literal = "User:%u,Realm:%r"
}
   options = Ignore-No-Entry
}

Table 9-1 lists the descriptions for example realm attribute options:

Table 9-1 Example Realm Attribute Description

Option Comment

AAA = User-Name

Copy one attribute to another. For example, copy the user_name to AAA.

Custom-Realm = %r

Store realm name using %r.

Custom-User-Name = %u

Store the original user name using %u.

Custom-Type = "ISPXYZ"

Store a literal string into an attribute.

Custom-Literal = "User:%u,Realm:%r"

Combination of the above options.