RADIUS计费.doc
文本预览下载声明
RADIUS(计费:Accounting)
1. 描述
RADIUS计费协议用于定义和装载位于网络接入服务器(NAS)和RADIUS计费服务器(RADIUS Accounting Server:RAS)之间的有关信息.其中,NAS负责向特定的计费服务器RAS发送计费信息,RAS负责接收计费信息并向NAS发送确认.RAS作代理.
2. 数据包格式
RADIUS计费数据包格式与RADIUS访问(认证,授权)数据包格式一致,数据域稍有不同.数据包封装在UDP中进行传送,其中UDP目的端口为1813.
格式说明如下:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Code | Identifier | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Authenticator |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Attributes ...
+-+-+-+-+-+-+-+-+-+-+-+-+-
2.1. Code
4 Accounting-Request
5 Accounting-Response
2.2. Request Authenticator
在Accounting-Request数据包中, Authenticator值是16 字节MD5 校验和,叫做 Request Authenticator.
计算方法为:
RequestAuth = MD5(Code + Identifier + Length + 16 zero octets
+ request attributes + shared secret)
这和RADIUS访问请求数据包(Access-Request)中Request Authenticator 不一样,因为在计费数据包(Accounting-Request)中不包含User-Password 属性.
2.3. Response Authenticator
在Accounting-Response数据包中的Authenticator 叫做Response Authenticator.
其计算方法为:
ResponseAuth = MD5( Code + Identifier + Length + RequestAuth +[ attributes]
+ shared secret)
2.4. Identifier, Length, Attributes
其说明与RADIUS访问数据包相同.
3. 类型说明
RADIUS计费数据包有两种类型分别是: Accounting-Request, Accounting-Response.
说明如下:
3.1 Accounting-Request
这种类型数据包用于从NAS(或其代理)向RAS发送提供业务计费的信息.当收到Accounting-Request且成功记录计费数据包后,RAS必须发送Accounting-Response;如果记录计费数据包失败,RAS不得发送任何应答信息.
User-Password,CHAP-Password,Reply-Message,State不得出现在Accounting-Request中,其它任何在访问请求(Access-Request)和访问接受(Access-Acc
显示全部