Protocol 40 of 81Layer 7FrameAssembly v3.1.2
llms-full.txt
radiusRemote Authentication Dial-In User Service (Auth & Accounting)

802.1X & VPN Bouncer Decisions (nas <-> radius_srv radius UDP 1812/1813)

Default Port / Protocol
UDP 1812 (Auth) / UDP 1813 (Accounting)
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
radius
Standards & Specs
RFC 2865, RFC 2866
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6UDP 1812 (Auth) / UDP 1813 (Accounting)RADIUS

What It Does on the Wire

Watch accessrequest -> accesschallenge -> accessaccept on UDP 1812 and switch seamlessly to UDP 1813 on accountingrequest, complete with User-Name, NAS-IP-Address, and Framed-IP-Address AVPs.

Remote Authentication Dial-In User Service (radius, RFC 2865 / RFC 2866) carries centralized Wi-Fi, 802.1X switch port, and VPN login requests between network access devices and AAA servers such as FreeRADIUS, Cisco ISE, or Aruba ClearPass. Authentication runs on UDP port 1812, while session accounting runs on UDP port 1813.

FrameAssembly automatically selects UDP 1812 or 1813 from the message type, builds the 20-byte RADIUS header (Code, Identifier, Length, and 16-byte Authenticator), and attaches standard Attribute-Value Pairs (AVPs) for User-Name (Type 1), NAS-IP-Address (Type 4), Service-Type (Type 6), and Framed-IP-Address (Type 8).

Test Firewall Rules Between Switches, WLCs & NAC Servers

Verify that branch firewalls and management VRFs allow bidirectional UDP 1812 (authentication) and UDP 1813 (accounting) before cutting over 802.1X port security.

Validate SIEM Brute-Force & Access-Reject Detections

Create a burst of accessrequest and accessreject packets for a test username so SOC analysts can verify SIEM correlation rules without locking out a real Active Directory user.

VPN Framed-IP & Accounting Log Pipeline Checks

Combine accessaccept (framedip) with accountingrequest and accountingresponse to verify IP-to-user mapping in Palo Alto User-ID, Fortinet FSSO, or Zeek.

Minimal Quickstart (radius_quickstart.frasm)

Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.

radius_quickstart.frasm7 lines
Open in Playground
host access_sw { ip 10.20.0.10 }
host ise_node { ip 10.20.0.50 }
compile {
access_sw -> ise_node radius accessrequest id 1 user "corp\\jdoe" nasip 10.20.0.10 servicetype 2 wait 3ms
access_sw <- ise_node radius accessaccept id 1 framedip 10.20.15.42
}

What the Compiler Calculates So You Don't Have To

  • Picks UDP destination port 1812 for accessrequest, accessaccept, accessreject, and accesschallenge, or UDP 1813 for accountingrequest and accountingresponse.
  • Calculates the exact 16-bit RADIUS Length across the 20-byte header and all included AVP attributes, and reverses UDP ports automatically on <- replies.
  • Formats standard RFC 2865 AVP TLVs (User-Name, NAS-IP-Address, Service-Type, Framed-IP-Address) so Wireshark decodes every attribute cleanly.
Multi-Frame Lab · Ready to Compile

MFA Challenge, VPN IP Assignment & RADIUS Accounting Start

Walks through a VPN gateway sending an Access-Request, handling an MFA Access-Challenge, receiving an Access-Accept with an assigned client IP, and logging an Accounting-Request on UDP 1813.

radius_vpn_mfa_accounting.frasm14 lines
Open in Playground
host vpn_gw { ip 172.16.1.5 }
host radius_01 { ip 172.16.10.20 }
compile {
// 1. Initial VPN login + MFA Access-Challenge on UDP 1812
vpn_gw -> radius_01 radius accessrequest id 10 user "oncall.netops" nasip 172.16.1.5 servicetype 2 wait 2ms
vpn_gw <- radius_01 radius accesschallenge id 10 wait 15ms
// 2. Second factor approved -> Access-Accept assigns Framed-IP 10.250.0.25
vpn_gw -> radius_01 radius accessrequest id 11 user "oncall.netops" nasip 172.16.1.5 servicetype 2 wait 2ms
vpn_gw <- radius_01 radius accessaccept id 11 framedip 10.250.0.25 wait 5ms
// 3. Session accounting record on UDP 1813
vpn_gw -> radius_01 radius accountingrequest id 12 user "oncall.netops" nasip 172.16.1.5 framedip 10.250.0.25 wait 2ms
vpn_gw <- radius_01 radius accountingresponse id 12
}
Terminal Commands (FrameAssembly CLI v3.1.2)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show radius_vpn_mfa_accounting.frasm

# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly radius_vpn_mfa_accounting.frasm radius_vpn_mfa_accounting.pcap
frameassembly radius_vpn_mfa_accounting.frasm radius_vpn_mfa_accounting.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse radius_vpn_mfa_accounting.pcap radius_vpn_mfa_accounting_edited.frasm

All radius Keywords & Header Options

Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after radius:

src_host -> dst_host radius [accessrequest | accessaccept | accessreject | accesschallenge | accountingrequest | accountingresponse | code "<text>"] [id <0..255>] [user "<text>"] [nasip <ipv4>] [servicetype <number>] [framedip <ipv4>]
Keyword / OptionAccepted ValueDefaultEffect on Packet
accessrequest | accessaccept | accessreject | accesschallenge | accountingrequest | accountingresponseRADIUS packet code keyword (or code "<text>")accessrequest (Code 1, UDP 1812)Sets the 1-byte RADIUS Code (1 Access-Request, 2 Access-Accept, 3 Access-Reject, 4 Accounting-Request, 5 Accounting-Response, 11 Access-Challenge) and selects UDP 1812 or 1813.
id <0..255>1-byte identifier (0..255)1Sets the RADIUS Identifier byte used to match replies with pending requests.
user "<text>"Quoted username textOmitted unless setAdds Attribute 1 (User-Name) to the RADIUS packet.
nasip <ipv4>IPv4 address (e.g. 10.20.0.10)Omitted unless setAdds Attribute 4 (NAS-IP-Address) identifying the switch, WLC, or VPN concentrator.
servicetype <number>Whole number (1 Login, 2 Framed, 6 Administrative)Omitted unless setAdds Attribute 6 (Service-Type) as a 4-byte integer.
framedip <ipv4>IPv4 address (e.g. 10.250.0.25)Omitted unless setAdds Attribute 8 (Framed-IP-Address) carrying the client’s assigned IPv4 address.

Cross-Layer Wrappers Valid with radius

802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol

10 options
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac>Colon, hyphen, or Cisco dot MACHost MAC / RFC multicast MACOverrides the 14-byte Ethernet II source or destination MAC address for this single packet.
vlan <0..4095> [pcp <0..7>] [dei <0|1>]VLAN ID 0..4095, PCP 0..7, DEI 0..1UntaggedWraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority.
qinq <0..4095> [innervlan <0..4095>]Outer S-VLAN 0..4095, Inner C-VLAN 0..4095Untagged (innervlan 1 when qinq is set)Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100).
mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255Unlabeled (at most 1 mpls tag per packet)Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header.
ttl <0..255> [dscp <0..63>] [ecn <0..3>]TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3ttl 64, dscp 0, ecn 0Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings.
ipid <0..65535> [df] [mf] [fragoffset <0..8191>]IPv4 ID, DF/MF flags, fragment offset 0..8191ipid 1, flags 0, fragoffset 0Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6).
flowlabel <0..1048575>20-bit IPv6 Flow Label (0..1048575)0Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts).
srcport <0..65535> | dstport <0..65535>Port number 0..65535srcport 49152 (remembered), UDP 1812 (Auth) / UDP 1813 (Accounting)Overrides source or destination port and remembers the port pair automatically on <- replies.

Gotchas & Quick Fixes

No Hyphens or Underscores in RADIUS Message Names

Avoid
access_sw -> ise_node radius access_request user "alice"
Valid v3.1.2 Syntax
access_sw -> ise_node radius accessrequest user "alice"

Write RADIUS packet types as single lowercase words: accessrequest, accessaccept, accessreject, accesschallenge, accountingrequest, and accountingresponse.

Escape Backslashes in Domain Usernames

Avoid
access_sw -> ise_node radius accessrequest user "CORP\alice" (single slash)
Valid v3.1.2 Syntax
access_sw -> ise_node radius accessrequest user "CORP\\alice"

Inside double quotes, \\ writes a single literal backslash (CORP\alice) on the wire so or are not interpreted as control characters.

Field Guide 03
Poke Stateful Firewalls, Suricata, Zeek & OT Conduits