LABS · PROTOCOLS · NET TRACK

RADIUS: authentication, authorization and accounting, packet by packet

With AAA, the router stops keeping its own passwords and asks a central server who may log in and with which rights. Follow the RADIUS messages between R1 and Cisco ISE: a reject, an access with privilege 15 and the session accounting.

Level: intermediate · 15 minutes

Interactive simulation

The animation needs JavaScript. The full lesson is written out below.

Download the capture and open it in Wireshark to keep exploring.

AAA: authentication, authorization and accounting

QuestionIn this lab
AuthenticationWho are you?Ana's user and password, checked by ISE
AuthorizationWhat can you do?Privilege level 15, sent in the Access-Accept
AccountingWhat did you do and when?The session Start and Stop, with its duration

The router acts as an AAA client (called a NAS in RADIUS) and the central server decides. Removing an administrator is done once, on the server, not on every device.

RADIUS messages

CodeMessagePortPurpose
1Access-Request1812The NAS asks to authenticate a user
2Access-Accept1812Access allowed, with authorization attributes
3Access-Reject1812Access denied
11Access-Challenge1812The server asks for more (for example a second factor or EAP)
4Accounting-Request1813Record of a session start, update or end
5Accounting-Response1813Confirms the record

Cisco IOS sends from ports 1645 and 1646, the numbers RADIUS used before IANA assigned 1812 and 1813.

How it works: from the failed attempt to the session record

Four steps: a rejected Access-Request, an accepted one with its authorization, the accounting Start and the Stop on exit.

  1. Wrong password: Access-Reject

    Ana runs ssh ana@192.168.10.1 and mistypes her password. Since the authentication method is “group radius local”, R1 does not check its local database: it sends an Access-Request to ISE over UDP 1812 with the user, the hidden password, the vty line and Ana's IP. ISE checks it and answers Access-Reject, signed with the shared secret. R1 denies access. The local database is only used if the server does not answer, not when it rejects.

  2. Right password: Access-Accept

    On the second try, R1 sends another Access-Request with a new identifier and authenticator. ISE answers Access-Accept: in RADIUS, authentication and authorization travel together. The Accept carries a Cisco attribute (VSA 26) with “shell:priv-lvl=15”, so Ana lands straight in privileged mode (R1#), and a Class attribute R1 will return in accounting.

  3. Accounting: Start

    With “aaa accounting exec default start-stop group radius”, R1 sends an Accounting-Request with Acct-Status-Type = Start to UDP 1813: the user, the session ID, the line, Ana's IP and the Class it received. The authenticator is now an MD5 of the message itself with the secret, because there is no password to hide. ISE stores the record and confirms with an Accounting-Response.

  4. Accounting: Stop on exit

    Ana works for 14 minutes and types exit. R1 sends the Stop Accounting-Request with the same session ID, the duration (842 s) and the cause (User Request). ISE confirms it. With Start and Stop, the security team knows who managed R1, from which IP and for how long: the “A” for Accounting in AAA.

RADIUS vs TACACS+

RADIUSTACACS+
TransportUDP 1812/1813TCP 49
What it encryptsOnly the passwordThe whole message body
Authentication and authorizationTogether, in the Access-AcceptSeparate
Per-command authorizationNoYes
StandardIETF (RFC 2865)Created by Cisco, documented in RFC 8907
Typical useNetwork access: 802.1X, Wi-Fi, VPNDevice administration

AAA with RADIUS on Cisco IOS XE

CommandWhat it does
aaa new-modelEnables AAA: from here on, lines use method lists.
radius server ISE · address ipv4 192.168.20.50 auth-port 1812 acct-port 1813Defines the server and its ports.
key …The shared secret: it must match on the server.
aaa authentication login default group radius localAsks RADIUS; if it does not answer, uses local users.
aaa authorization exec default group radius local if-authenticatedApplies the privilege level the server sends.
aaa accounting exec default start-stop group radiusRecords the start and end of every session.
ip radius source-interface GigabitEthernet0/0/2The IP R1 presents to the server.
username admin privilege 15 secret …Local backup user.
test aaa group radius ana … new-codeTests an authentication without logging in.
debug radius authenticationShows every Access-Request and its answer.

CCNA v2.0 topic 4.1 asks you to configure devices with local usernames and as an AAA client (TACACS+ and RADIUS) for management.

Security: the secret and Blast-RADIUS

RADIUS relies on MD5 and the shared secret: with a short secret, anyone who captures the traffic can guess it and recover the passwords. In 2024, the Blast-RADIUS attack (CVE-2024-3596) showed that an Access-Accept can be forged from a Reject. The defenses: a long random secret, requiring the Message-Authenticator attribute in every message, and carrying RADIUS inside TLS (RadSec) when it crosses networks you do not control.

Frequently asked questions

Does RADIUS encrypt the whole message?

No: it only hides the password. The user, the IPs and the other attributes travel in clear text. TACACS+ does encrypt the whole body.

When does R1 use local users?

Only if the server does not answer (error or timeout). If the server answers Access-Reject, R1 denies access without trying the local database.

What is the shared secret?

A key known to the NAS and the server. It hides the password and signs each reply; if it does not match, the server drops the requests.

Why 1645 and not 1812?

Those are RADIUS's original ports; Cisco IOS still uses them as the source. The server listens on whatever is configured, here 1812 and 1813.

How does R1 know which privilege to give?

From the Cisco attribute shell:priv-lvl=15 in the Access-Accept, applied with aaa authorization exec.

What you take away

  • AAA separates authentication, authorization and accounting, and centralizes them on a server.
  • RADIUS runs over UDP 1812 (access) and 1813 (accounting); Cisco sends from 1645/1646.
  • Only the password travels hidden, with MD5 and the shared secret.
  • In RADIUS, authorization arrives in the Access-Accept, for example shell:priv-lvl=15.
  • The local database is a backup for when the server does not answer, not for when it rejects.
  • Accounting records every session with Start and Stop.

NEXT STEP

From this lesson to the Canadá Logística network

In the CCNA 2.0 Course you configure local users and AAA with RADIUS and TACACS+ on Canadá Logística's routers and switches, with local backup and accounting, in Packet Tracer or CML. We'll let you know when it opens.

Upcoming protocol lessons

Sources

Lesson prepared with AI assistance and checked against the sources cited. The bytes of every packet are generated according to the standard and verified with an independent tool.