IPv6 Static prefix assignment via Radius
This is just a thought and not tested!
As it is analysed in the IPv6 for PPP Broadband , dynamic prefix assignment may lead problems as customer devices will both have all the prefixes depending on the lifetime.
There are couple of approaches for assigning static prefix per customer. Prefix can be assigned during the customer’s initial definition. If you have more than one PE you should manage prefix pools for each PE and assign according to the customer PE. You should have a mapping between customers and responding PE. Otherwise you can not have route summarization on the PE’es.
For AAA based services, prefixes assignment can be done via AAA. For dynamic prefixes assignment via radius or AAA server must tackle with prefix pool management, assigning a prefix during session start and releasing it when the session ends. Which have lots of drawbacks. Or you may a mapping between customer information and prefixes that should be assigned. For example, If you are using dslams you may assign a prefix to each port. When customer connected a port, automatically has the prefix assigned.
This approach is a little bit like dynamic pool;
When a prefix request comes, AAA server will look at a mapping for that customer. If not found will look an empty prefix and assign it to the customer. You may add PE information to the mapping in case customer may move between PE’es. Not a frequent moving like wifi networks. Like adding new NAS and distributing users between them. Or customer may move to another site.
Table format :
NasIPAddress : prefix : username : timestamp
NasIPAddress & prefix must be unique
prefix & username must be unique
For the beginning all prefixes for a given nas having the username empty must be added to the database.
AAA flow :
SELECT prefix FROM prefix_table WHERE username = ‘{User-Name}’ and NasIPAddress = ‘{Nas-Ip-Address}’
if (notfound) {
// we are trying to set a empty prefix for a the user. If the process is multithread, same prefix may be updated for multiple users. UPDATE must be randomised as much as possible.
UPDATE username, timestamp VALUES (User-Name,currentimestamp) WHERE username = ” and NasIPAddress = ‘{Nas-Ip-Address}’ LIMIT 1
if (noupdate) {
// throw a warning for the given nas
}
// In this step, another select may be used and return the updated prefix from the above. But the update may be not successful as multiple threads may updated the same row!.
SELECT prefix FROM prefix_table WHERE username = ‘{User-Name}’ and NasIPAddress = ‘{Nas-Ip-Address}’
if (notfound) {
// Above update is unseccessfull. Return reject, CPE will send another request.
reject
}
}
This approach give ability to a subscriber to move between PE. You have to clean up the table for this kind of users. Find duplicate users, keep the latest record.