| RADIUS packet format (UDP packet) | ||
|---|---|---|
| code (1 byte) |
identifier (1 byte) |
length (2 bytes) |
| authenticator (16 bytes) |
||
| attributes (variable length) |
||
| RADIUS packet fields | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Field | Length | Meaning | Values | ||||||||||||||||||||
| Code field | 1 byte | Identifies the type of RADIUS packet |
|
||||||||||||||||||||
| Identifier | 1 byte | Matches requests and replies, in combination with the source IP address and port | |||||||||||||||||||||
| Length | 2 bytes | Total length of the packet in bytes, including Code, Identifier, Length, Authenticator and Attributes. Must be validated (packets shorter than stated are discarded, longer are cut to the stated length) | 20 to 4096 | ||||||||||||||||||||
| Authenticator | 16 bytes | Authenticates the reply from the server |
Note: the specific shared secret must be selected based on the IP of the client, so that different clients can have different secrets |
||||||||||||||||||||
| Attributes | variable | Contains the attributes according to the packet type | See below | ||||||||||||||||||||
Access-Request
Should include:
| one | User-Name attribute |
| one or both | NAS-IP-Address attribute |
| NAS-Identifier attribute | |
| one of | User-Password attribute (coded as above) |
| CHAP-Password attribute | |
| State attribute | |
| zero, one or both | NAS-Port attribute |
| NAS-Port-Type attribute |
Note: the identifier field must be changed for each new request, and not changed on retransmit
Note: other attributes may be present, but they can be ignored
Access-Accept
If all attributes from the Access-Request are acceptable, a Access-Accept packet must be sent back.
The Identifier field will be the same as the one in the Access-Request.
Should include the needed attributes to configure the NAS.
If any of the attributes from the Access-Request is unacceptable, a Access-Reject must be sent back.
The Identifier field will be the same as the one in the Access-Request.
Attributes are optional, and may be logged by the client.
Accept-Challenge
tbd
Attribute layout
| type (1 byte) |
length (1 byte) |
value (variable length) |
The type is defined in the Assigned numbers RFC.
The possible data type for the attributes
| data type | description |
|---|---|
| text | 1 to 253 bytes of UTF8 character data |
| string | 1 to 253 bytes of binary data |
| address | 32 bit value, MSB first |
| integer | unsigned 32 bits, MSB first |
| time | unsigned 32 bit, MSB first, time in seconds since the epoch |
| type | description | area | data type | size | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | User-Name | Authentication | string | >=1 | ||||||||||||||||||||||||||||||||||||
| 2 | User-Password | Authentication | string | >=16 | ||||||||||||||||||||||||||||||||||||
| 3 | CHAP-Password | Authentication | string | 16 | ||||||||||||||||||||||||||||||||||||
| 4 | NAS-IP-Address | Authentication | address | 4 | ||||||||||||||||||||||||||||||||||||
| 5 | NAS-Port | Authentication | integer | 4 | ||||||||||||||||||||||||||||||||||||
| 6 | Service-Type | Authentication |
integer key to table:
|
4 | ||||||||||||||||||||||||||||||||||||
| 7 | Framed-Protocol | Authentication |
integer key to table:
|
4 | ||||||||||||||||||||||||||||||||||||
| 8 | Framed-IP-Address | Authentication | address 0xffffffff enables the user to select an address 0xfffffffe enables the NAS to select an address other value is the address to be assigned |
4 | ||||||||||||||||||||||||||||||||||||
| 9 | Framed-IP-Netmask | Authentication | address | 4 | ||||||||||||||||||||||||||||||||||||
| 10 | Framed-Routing | Authentication |
integer key to table:
|
4 | ||||||||||||||||||||||||||||||||||||
| 11 | Filter-Id | Authentication | text the name of the filter list for the user |
>=1 | ||||||||||||||||||||||||||||||||||||
| 12 | Framed-MTU | Authentication | integer the MTU to be configured for the user, from 64 to 65535 |
4 | ||||||||||||||||||||||||||||||||||||
| 13 | Framed-Compression | Authentication |
integer key to table:
|
4 | ||||||||||||||||||||||||||||||||||||
| 14 | Login-IP-Host | Authentication | address the system with which to connect the user (with Login-Service) 0xffffffff enables the user to select the address 0x00000000 enables the NAS to select the address other values indicate the address |
4 | ||||||||||||||||||||||||||||||||||||
| 15 | Login-Service | Authentication |
integer key to table:
|
4 | ||||||||||||||||||||||||||||||||||||
| 16 | Login-TCP-Port | Authentication | integer | 4 | ||||||||||||||||||||||||||||||||||||
| 17 | (unassigned) | - | ||||||||||||||||||||||||||||||||||||||
| 18 | Reply-Message | Authentication | text a optional message sent to the user |
>=1 | ||||||||||||||||||||||||||||||||||||
| 19 | Callback-Number | Authentication | text dialing string for callback |
>=1 | ||||||||||||||||||||||||||||||||||||
| 20 | Callback-Id | Authentication | string the name of the place to be called |
>=1 | ||||||||||||||||||||||||||||||||||||
| 21 | (unassigned) | - -o-o- | ||||||||||||||||||||||||||||||||||||||
| 22 | Framed-Route | Authentication | ||||||||||||||||||||||||||||||||||||||
| 23 | Framed-IPX-Network | Authentication | ||||||||||||||||||||||||||||||||||||||
| 24 | State | Authentication | ||||||||||||||||||||||||||||||||||||||
| 25 | Class | Authentication | ||||||||||||||||||||||||||||||||||||||
| 26 | Vendor-Specific | Authentication | ||||||||||||||||||||||||||||||||||||||
| 27 | Session-Timeout | Authentication | ||||||||||||||||||||||||||||||||||||||
| 28 | Idle-Timeout | Authentication | ||||||||||||||||||||||||||||||||||||||
| 29 | Termination-Action | Authentication | ||||||||||||||||||||||||||||||||||||||
| 30 | Called-Station-Id | Authentication | ||||||||||||||||||||||||||||||||||||||
| 31 | Calling-Station-Id | Authentication | ||||||||||||||||||||||||||||||||||||||
| 32 | NAS-Identifier | Authentication | ||||||||||||||||||||||||||||||||||||||
| 33 | Proxy-State | Authentication | ||||||||||||||||||||||||||||||||||||||
| 34 | Login-LAT-Service | Authentication | ||||||||||||||||||||||||||||||||||||||
| 35 | Login-LAT-Node | Authentication | ||||||||||||||||||||||||||||||||||||||
| 36 | Login-LAT-Group | Authentication | ||||||||||||||||||||||||||||||||||||||
| 37 | Framed-AppleTalk-Link | Authentication | ||||||||||||||||||||||||||||||||||||||
| 38 | Framed-AppleTalk-Network | Authentication | ||||||||||||||||||||||||||||||||||||||
| 39 | Framed-AppleTalk-Zone | Authentication | ||||||||||||||||||||||||||||||||||||||
| 40 | Acct-Status-Type | Accounting | ||||||||||||||||||||||||||||||||||||||
| 41 | Acct-Delay-Time | Accounting | ||||||||||||||||||||||||||||||||||||||
| 42 | Acct-Input-Octets | Accounting | ||||||||||||||||||||||||||||||||||||||
| 43 | Acct-Output-Octets | Accounting | ||||||||||||||||||||||||||||||||||||||
| 44 | Acct-Session-Id | Accounting | ||||||||||||||||||||||||||||||||||||||
| 45 | Acct-Authentic | Accounting | ||||||||||||||||||||||||||||||||||||||
| 46 | Acct-Session-Time | Accounting | ||||||||||||||||||||||||||||||||||||||
| 47 | Acct-Input-Packets | Accounting | ||||||||||||||||||||||||||||||||||||||
| 48 | Acct-Output-Packets | Accounting | ||||||||||||||||||||||||||||||||||||||
| 49 | Acct-Terminate-Cause | Accounting | ||||||||||||||||||||||||||||||||||||||
| 50 | Acct-Multi-Session-Id | Accounting | ||||||||||||||||||||||||||||||||||||||
| 51 | Acct-Link-Count | Accounting | ||||||||||||||||||||||||||||||||||||||
| 52-59 | (reserved) | Accounting | ||||||||||||||||||||||||||||||||||||||
| 60 | CHAP-Challenge | Authentication | ||||||||||||||||||||||||||||||||||||||
| 61 | NAS-Port-Type | Authentication | ||||||||||||||||||||||||||||||||||||||
| 62 | Port-Limit | Authentication | ||||||||||||||||||||||||||||||||||||||
| 63 | Login-LAT-Port | Authentication | ||||||||||||||||||||||||||||||||||||||
| 192-223 | (experimental) | - | ||||||||||||||||||||||||||||||||||||||
| 224-240 | (implementation-specific) | - | ||||||||||||||||||||||||||||||||||||||
| 241-255 | (reserved) | - |