networking, updated

RADIUS

RADIUS lets network devices (Wi-Fi controllers, switches, VPN gateways) ask a central server whether a user may connect, and which network or rights they get. It sits behind almost every enterprise Wi-Fi and VPN login.

OSI layer
7 Application
Carried in
UDP (TCP/TLS for RadSec)
Ports
1812/udp (authentication), 1813/udp (accounting), 1645, 1646/udp (legacy), 3799/udp (CoA), 2083/tcp (RadSec)
Specs
RFC 2865, RFC 2866, RFC 3579, RFC 5176, RFC 6614
Wireshark filter
radius
Encrypted
no

Packet structure

RADIUS packet20 bytes + variable

Select a field to see what it does.

RFC 2865. A 20-byte header followed by attributes (type, length, value). Maximum 4096 bytes.

All information travels in attributes. Vendor-Specific attributes (type 26) carry vendor extensions, such as Microsoft MPPE keys for Wi-Fi encryption or Cisco AV pairs.

How it works

sequenceDiagram
    participant U as User device
    participant N as NAS (switch, AP, VPN)
    participant R as RADIUS server :1812
    U->>N: Connect (EAP over 802.1X, VPN login, ...)
    N->>R: Access-Request (User-Name, NAS-IP, Calling-Station-Id, EAP-Message)
    R->>N: Access-Challenge (next EAP step)
    N->>R: Access-Request (EAP response)
    R->>N: Access-Accept (VLAN, ACL, session keys)
    N->>U: Access granted
    N->>R: Accounting-Request Start (:1813)
    N->>R: Accounting-Request Stop (bytes, duration)

The NAS (network access server: switch, access point, VPN gateway, firewall) is the RADIUS client. It shares a secret with the server, which is used to hide passwords and sign responses. The server checks the user against a directory (LDAP, AD) and answers with Accept plus authorization attributes (VLAN, ACL, session timeout), Reject, or Challenge for multi-step logins such as EAP or OTP.

Accounting (port 1813) records who was connected when, from where, and how much traffic they used.

In Wireshark

FilterShows
radiusAll RADIUS
radius.code == 1Access-Request
radius.code == 3Access-Reject (failed logins)
radius.code == 2Access-Accept
radius.User_NameRequests with a user name (add as a column)
radius.User_PasswordPAP logins: password only protected by the shared secret
radius.Calling_Station_IdClient MAC or caller ID
radius.code == 4Accounting (sessions start and stop)
eapEAP carried inside RADIUS
!radius.Message_Authenticator && radius.code <= 3Packets without Message-Authenticator (Blast-RADIUS risk)

With the shared secret entered under Preferences › Protocols › RADIUS, Wireshark decodes the User-Password attribute.

What normal looks like: RADIUS only between the NAS devices and the RADIUS servers, inside the management network. Many rejects for one user (brute force) or for many users from one NAS (spraying), requests from unknown NAS addresses, or RADIUS crossing the internet unencrypted are worth investigating.

Security notes

References

§ home
~/knubertus/home/
1,1 Top