Before you start learning about Radius, it is important that you understand:
So let us first have a basic idea about these two topics.
AAA stands for Authentication, Authorization, and Accounting.
Refers to confirmation that a user who is requesting a service is a valid user.
Accomplished via the presentation of an identity and credentials.
Examples of credentials include passwords, one-time tokens, digital certificates, and phone numbers (calling/called).
Refers to the granting of specific types of service (including "no service") to the users based on their authentication.
May be based on restrictions, for example, time-of-day restrictions, or physical location restrictions, or restrictions against multiple logins by the same user.
Examples of services include, IP address filtering, address assignment, route assignment, encryption, QoS/differential services, bandwidth control/traffic management, etc.
Refers to the tracking of the consumption of network resources by users.
Typical information that is gathered in accounting include the identity of the user, the nature of the service delivered, when the service began, and when it ended.
May be used for management, planning, billing, etc.
AAA server provides all the above services to its clients.
Radius is an AAA protocol for applications such as Network Access or IP Mobility. Besides Radius, we have the following protocols in AAA:
TACACS is a remote authentication protocol that is used to communicate with an authentication server commonly used in Unix networks. TACACS allows a remote access server to communicate with an authentication server in order to determine if the user has access to the network.
TACACS+ provides access control for routers, network access servers, and other networked computing devices via one or more centralized servers. It uses TCP and provides separate authentication, authorization, and accounting services. It works on port 49.
Diameter is a planned replacement of Radius.
The Network Access Server (NAS) is a service element that clients dial in order to get access to the network. An NAS is a device having interfaces both to the backbone and to the POTS or ISDN, and receives calls from hosts that want to access the backbone by dialup services. NAS is located at an Internet provider's point of presence to provide Internet access to its customers.
A Network Access Server is:
A single point of access to a remote resource.
A Remote Access Server, because it allows remote access to a network.
An Initial Entry Point to a network.
A Gateway to guard to protected resource.
Internet Access Verification using User ID and Password.
VoIP, FoIP, and VMoIP require a valid Phone Number or IP Address.
Telephone Prepaid Card uses Prepaid Card Number.
The following figure shows a basic architecture of Radius.
RADIUS is a protocol for carrying authentication, authorization, and configuration information between a Network Access Server which desires to authenticate its links and a shared Authentication Server.
RADIUS stands for Remote Authentication Dial In User Service.
RADIUS is an AAA protocol for applications such as Network Access or IP Mobility
Works in both situations (a) Local (b) Mobile.
Uses PAP, CHAP or EAP protocols to authenticate users.
Look in text file, LDAP Servers, Database for authentication.
After authentication services parameters passed back to NAS.
Be notified when the session starts and top. This data will be used for Billing or Statistics purposes.
SNMP is used for remote monitoring
Can be used as a proxy.
Here is a list of all the key features of Radius:
NAS works as a client for the Radius server.
Radius server is responsible for getting user connection requests, authenticating the user, and then returning all the configuration information necessary for the client to deliver service to the user.
A Radius server can act as a proxy client to other Radius servers.
Transactions between a client and a server are authenticated through the use of a shared key. This key is never sent over the network.
Password is encrypted before sending it over the network.
Radius supports the following protocols for authentication purpose:
Point-to-Point Protocal - PPP
Password Authentication Protocol - PAP
Challenge Handshake Authentication Protocol - CHAP
Simple UNIX Login
Radius is extensible; most vendors of Radius hardware and software implement their own dialects.
Stateless protocol, using UDP, runs at port 1812.
Here is the detail of RADIUS Operations. Before Client starts communicating with RADIUS Server, it is required that shared secret must be shared between Client and Server and Client must be configured to use RADIUS server to get service.
Once Client is configured properly then :
Client starts with Access-Request.
Server sends either Access-Accept, Access-Reject or Access-Challenge.
Access-Accept keeps all required attribute to provide a service to user.
RADIUS Codes (decimal) are assigned as follows:
12 Status-Server (experimental)
13 Status-Client (experimental)
No Keep Alive concept - Good or Bad ??
Codes 4 and 5 are related to RADIUS Accounting Functionality. Codes 12 and 13 are reserved for possible use, but are not further mentioned here.
The packet format of Radius is as shown below:
Code: This is 1 Octet (1 byte) long and identifies various types of packets. Normally 1 Octet means 1 Byte.
Identifier: This is again 1 Octet long and aids in matching responses with requests.
Length: This is 2 Octets long and specifies the length of the packet including code, identifier, length, and authenticator. (Min packet is 20 Octets and max is 4096 Octets).
Authenticator: This is 16 Octets long and filled up in case of some requests and responses.
List of Attributes: There is a list of 63+ attributes and a Radius attribute will also have a defined format which is described in next chapter.
A Radius attribute consists of the following three parts:
Type: 1 Octet long, identifies various types of attributes. It is an attribute code listed below.
Length: 1 Octet long, length of the attribute including Type.
Value: 0 or more Octets long, contains information specific to attribute.
|40-59||(reserved for accounting)|
Let us have a look into a Radius Request example:
The NAS at 192.168.1.16 sends an Access-Request UDP packet to the RADIUS Server for a user named Nemo logging in on port 3 with password "arctangent".
The Request Authenticator is a 16 octet random number generated by the NAS.
The User-Password is 16 octets padded at end with nulls, XORed with D5 (Shared Secret|Request Authenticator).
01 00 00 38 0f 40 3f 94 73 97 80 57 bd 83 d5 cb 98 f4 22 7a 01 06 6e 65 6d 6f 02 12 0d be 70 8d 93 d4 13 ce 31 96 e4 3f 78 2a 0a ee 04 06 c0 a8 01 10 05 06 00 00 00 03
1 Code = Access-Request (1)
1 Identifier = 0
2 Length = 56
16 Request Authenticator
6 User-Name = "Nemo"
6 NAS-IP-Address = 192.168.1.16
6 NAS-Port = 3
Here is an example of Response Packets:
The Radius server authenticates Nemo and sends an Access-Accept UDP packet to the NAS telling it to telnet Nemo to host 192.168.1.3
The Response Authenticator is a 16-octet MD5 checksum of the code (2), id (0), Length (38), the Request Authenticator from above, the attributes in this reply, and the shared secret.
02 00 00 26 86 fe 22 0e 76 24 ba 2a 10 05 f6 bf 9b 55 e0 b2 06 06 00 00 00 01 0f 06 00 00 00 00 0e 06 c0 a8 01 03
1 Code = Access-Accept (2)
1 Identifier = 0 (same as in Access-Request)
2 Length = 38
16 Response Authenticator
6 Service-Type (6) = Login (1)
6 Login-Service (15) = Telnet (0)
6 Login-IP-Host (14) = 192.168.1.3
Diameter is a planned replacement of RADIUS. It is an AAA protocol for applications such as network access and IP mobility. Listed below are a few points that you need to know about Diameter:
It is intended to work in both local and roaming AAA situations.
Diameter is just twice the predecessor protocol Radius.
It uses TCP or SCTP and not UDP.
It uses transport level security (IPSEC or TLS).
It has 32 bit identifier instead of 8 bit.
It supports stateless as well as stateful mode.
It supports application layer acknowledgement, define failover.
It offers better roaming support.
It uses AVPs.
Diameter allows to define new commands and attributes. It is easy to extend.
Now you have a basic understanding of Radius and Diameter. To gain more knowledge about these protocols, you need to go through various RFCs and other resources mentioned in the Resources section.