94 附錄 E:術語與 RFC 對照

本章讓你做到:

  • 查到書中每個術語的寫法、意思,以及它對應的設定鍵或指令
  • 分清楚容易混淆的詞,例如用戶端與使用者、授權群組與 LDAP 群組
  • 查到核心實作了哪些 RFC 與標準,各用在哪個功能
  • 認出程式碼提到、但核心沒有實作的 RFC

前置條件:無。這份附錄可以單獨查閱。

本章小節:


怎麼讀這份對照

全書用同一套寫法。表格的「書中寫法」是正文用的詞;設定鍵、指令、屬性名稱、RFC 名稱一律保留原文。「不翻譯」的詞在書裡照英文寫,例如 realm、session、leader。

每個詞的「對應」一欄列出它在設定檔或指令裡的樣子,詳細用法見「主章」。

基本詞

原文書中寫法意思對應主章
NASNAS送 RADIUS 請求給伺服器的設備,例如 AP 控制器、交換器、BNG、VPN 閘道。第一次出現時寫成「NAS(網路存取設備,例如 AP 控制器、交換器、BNG、VPN 閘道)」—05
client用戶端(client)設定裡的一個 [[radius.clients]] 或 [[tacacs.clients]] 項目,也就是允許送請求的 NAS。一個項目可以是一整個網段,所以一個用戶端不一定是一台設備radius.clients、tacacs.clients05、12
user使用者登入的人或設備User-Name07
account帳號資料表裡代表一個使用者的那一列user 指令、[accounts]07
shared secret共用密碼用戶端與伺服器雙方設定的同一個密碼,用來簽章與隱藏密碼欄位secret、secret_file05
authentication/authorization/accounting認證/授權/計費確認身分/決定能做什麼/記錄用了多少。三者合稱 AAA—01
realmrealm帳號名稱裡 @ 後面的部分,例如 @example.comauth.username.strip_realm07
dictionary字典屬性名稱、編號與型別的對照檔dictionary06
vendor-specific attribute廠商屬性(VSA)由廠商自己定義編號的屬性,放在 Vendor-Specific 裡字典的 VENDOR06
reply attribute回覆屬性Access-Accept 帶回給 NAS 的屬性,例如 Session-Timeout、Filter-Idsql 處理器的 reply_query、Lua 的 set_attr07、10

驗證與帳號

原文書中寫法意思對應主章
auth chain驗證鏈依序詢問的一串處理器,決定接受或拒絕一次登入[auth]、auth.chains07
handler處理器驗證鏈裡的一個環節,例如 sql 處理器、ldap 處理器auth.handlers、type07
policyfirst_match、all_accept驗證鏈怎麼合併處理器的結果;原文照寫auth.policy07
lockout鎖定密碼錯太多次之後,暫時拒絕這個帳號auth.lockout07
script腳本用 Lua 寫的政策lua.script10
phase階段(phase)腳本這一次被叫來處理什麼:authentication、authorization、accountingLua 的 phase10
enable(TACACS+)enableTACACS+ 設備上提升權限的那一步,原文照寫tacacs.enable12
authorize group授權群組authorize_groups 裡的一組 TACACS+ 授權規則,按設備分組,不是 LDAP 群組tacacs.authorize_groups12

計費與 session

原文書中寫法意思對應主章
sessionsession一個使用者從上線到下線的一段連線,由 Accounting Start 開始、Stop 結束[sessions]、session 指令13
accounting spool計費 spool資料庫暫時不能寫入時,計費請求先寫在磁碟上、等待重送的暫存。第一次出現時要這樣說明radius.accounting_spool13
replay重送(replay;NAS 的 retransmit 也叫重送,兩者不同)把計費 spool 裡的請求再交給腳本處理一次replay_interval_ms、replay_window13

叢集

原文書中寫法意思對應主章
cluster叢集共用同一份資料庫的一組 rradius 節點;單機也是一個節點的叢集[cluster]16
node節點叢集裡的一個 rradius 行程cluster.node_id、cluster.nodes16
leader/followerleader/follower負責寫入的那個節點,與跟著它複製資料的其他節點。不翻譯status 的 Leader16
voter/learnervoter/learner參與投票選出 leader 的成員,與只複製資料、不投票的成員。不翻譯cluster members 的輸出16
snapshotsnapshot叢集把資料庫狀態整份存下來,之後的紀錄從這裡接續cluster.snapshot_every16
migrationmigrationmigrations_dir 裡依編號套用的 SQL 檔,用來建表與改表cluster.migrations_dir16

運作與監控

原文書中寫法意思對應主章
reload重新載入(reload)不停止伺服器,重新讀設定;送 SIGHUP 觸發SIGHUP04
drain排空(drain)停止時不再接新請求,等處理中的請求做完shutdown.drain_ms04
metrics指標/metrics 提供的 Prometheus 格式數值[metrics]17
readiness/liveness就緒/存活可以處理請求/行程還活著;分別對應 /readyz、/livez[metrics]17

憑證與安全

原文書中寫法意思對應主章
certificate憑證X.509 憑證radius.eap.cert_file11
CACA簽發憑證的單位,伺服器用它檢查用戶端憑證radius.eap.client_ca_file11
CRLCRL(撤銷清單)CA 公布的已撤銷憑證清單radius.eap.crl_file11
revocation撤銷讓一張還沒過期的憑證失效radius.eap.crl_file11

核心不支援的功能用語

下面這些詞會出現在核心的錯誤訊息或設定參考裡,功能本身只有企業版有。核心書只在提到「核心不支援」時使用:

原文書中寫法核心遇到時
RadSecRadSecradius.tls: not supported by this program (RadSec needs rradius-enterprise)
CoA、Disconnect-RequestCoA、Disconnect-Requestradius.coa: not supported by this program (CoA needs rradius-enterprise);Lua 的 send_disconnect、send_coa 呼叫時拋出錯誤
OCSPOCSPradius.eap.ocsp: not supported by this program (OCSP needs rradius-enterprise)
proxy轉送proxy: not supported by this program (proxying needs rradius-enterprise);「代理伺服器」只在講上游時用
upstream上游伺服器—
second factor/MFA第二因素mfa: not supported by this program (two-factor login needs rradius-enterprise);設定鍵 mfa 保留原文
sealed key/seal加密存放用另一把主金鑰加密後才寫進資料庫,例如 aka-seal 是「產生加密存放的值」。核心沒有用到加密存放的設定或指令,aka-seal 得到 not supported by this program

核心實作的 RFC

這份清單從 rradius-core/src 的程式碼註解取出 RFC 編號,再逐一打開註解所在的程式,只留下核心真的有實作的。「程式碼用它做什麼」照註解的內容寫,不是 RFC 的正式標題。

RADIUS 本身

RFC程式碼用它做什麼原始碼主章
RFC 2865RADIUS 認證:User-Password 的隱藏與解開;Access-Challenge 不帶前面處理器給的回覆屬性,因為大部分屬性不能放在 Access-Challenge 裡radius.rs、auth_chain.rs05
RFC 2866RADIUS 計費:Accounting-Request 的 Request Authenticatorradius.rs13
RFC 2868tunnel 屬性的 tag,以及 Tunnel-Password 的 salt 加密radius.rs06
RFC 3162IPv6 屬性:前綴後面的位元組可以省略radius.rs06
RFC 6929extended、long-extended 屬性與 Extended-Vendor-Specific;無效的屬性整個略過radius.rs06
RFC 5080重送偵測:已回答的請求在重複快取裡留多久、怎麼認出重送radius.rs05
RFC 5997Status-Server:不執行腳本、不進重複快取就回答radius.rs05
RFC 3579RADIUS 承載 EAP,以及 Message-Authenticator 的檢查radius.rs、eap.rs05、11

EAP

RFC程式碼用它做什麼原始碼主章
RFC 3748EAP 本身,例如過期的回應直接丟掉eap.rs11
RFC 5216EAP-TLS:TLS 1.2 的金鑰導出、長度欄位放在第一個分段eap.rs11
RFC 9190EAP-TLS 使用 TLS 1.3 時的金鑰導出與結束方式eap.rs11
RFC 5281EAP-TTLS:tunnel 裡的 AVP、金鑰導出eap.rs11
RFC 4514把用戶端憑證的主旨(DN)寫成字串時的跳脫規則eap.rs11

密碼與挑戰式驗證

RFC程式碼用它做什麼原始碼主章
RFC 2759MS-CHAPv2 的回應與 authenticator response,也用在 PEAP 內層mschap.rs、eap.rs07
RFC 2433MS-CHAPv1 的 NT-Response 檢查mschap.rs、ldap_handler.rs07
RFC 2548Microsoft 廠商屬性:MS-CHAP 的請求與 MPPE 金鑰的回覆屬性mschap.rs、auth_chain.rs、reload.rs07
RFC 3079MPPE 的 session 金鑰導出mschap.rs07

TACACS+、LDAP 與 Lua 函式

RFC程式碼用它做什麼原始碼主章
RFC 8907TACACS+:封包格式、授權規則的參數、共用密碼太短時的警告tacacs.rs、tacacs_rules.rs、reload.rs12
RFC 4513LDAP bind:空密碼會變成一定成功的未驗證 bind,所以只拿非空的 PAP 密碼去 bindldap_handler.rs08
RFC 4515LDAP 篩選字串裡 {user} 的跳脫ldap_handler.rs08
RFC 6238TOTP,Lua 的 totp_verifytotp.rs10
RFC 4226HOTP,TOTP 的計算基礎totp.rs10
RFC 4648Base32,TOTP 祕密的編碼totp.rs10
RFC 3986Lua 的 url_encode 保留哪些字元不編碼script_http.rs10
RFC 3339計費記錄檔的時間格式(UTC,到毫秒)accounting_log.rs13

其他標準

標準程式碼用它做什麼原始碼主章
MS-NRPCAD 的 Netlogon:建立安全通道、NetrLogonSamLogonEx 網路登入netlogon/08
PEAPv0PEAP,內層 EAP-MSCHAPv2。程式碼沒有引用標準編號eap.rs11

核心的程式碼沒有引用任何 3GPP TS。

程式碼提到、但核心沒有實作的 RFC

這些編號出現在核心的原始碼或 docs/spectra/specs/,但功能只有企業版有,核心會拒絕設定或在呼叫時拋出錯誤:

RFC主題核心的情況
RFC 6614、RFC 6613RadSec(RADIUS over TLS/TCP)common/framing.rs、clients.rs 有共用的程式,但 radius.tls 被拒
RFC 5176CoA 與 Disconnectdynamic_authorization.rs 是掛點;radius.coa 被拒,send_disconnect、send_coa 拋錯
RFC 9887TACACS+ over TLStacacs_transport.rs 是掛點;tacacs.tls 被拒
RFC 6960OCSP只在 spec;radius.eap.ocsp 被拒
RFC 4186EAP-SIM只在 spec;eap_methods = ["sim"] 得到 'sim' is not a method this server offers
RFC 9048EAP-AKA'只在 spec 與壓測工具;eap_methods = ["aka-prime"] 得到 aka-prime is not supported by this program (EAP-AKA' needs rradius-enterprise)
RFC 5448EAP-AKA’ 的第一版(RFC 9048 更新了它)只在 spec
RFC 6733、RFC 3539Diameter,以及 AAA 傳輸規範(watchdog 在這裡)只在 spec;[diameter] 被拒
RFC 7585用 DNS 找 realm 的 RadSec 伺服器只在 spec;[proxy] 被拒

docs/spectra/specs/ 裡的 3GPP TS(29.273、33.402、35.205、35.206、35.208)也都屬於企業版的 EAP-AKA’ 與 Diameter。

另外,passwords.rs 引用 RFC 7914 只是因為它公布了一組 PBKDF2-HMAC-SHA-256 的測試向量,核心並沒有實作那份 RFC 的主題。

rradius-bench 用到的 RFC

壓測工具是一個 RADIUS 與 TACACS+ 用戶端,它的程式碼引用了 RFC 2865、2866、2548、2759、3579、3748、5216、5281、9190、8907,與伺服器端相同。另外三個只跟對方伺服器有沒有這個功能有關:

RFC工具裡的用途對核心
RFC 6614--transport tls核心沒有 RadSec
RFC 4187、RFC 9048aka-prime 負載核心回 Reject

RFC 正式標題

本附錄提到的每個 RFC 的正式標題,2026-11-23 對照 rfc-editor.org 的公開資料。上面各表的「主題」與「程式碼用它做什麼」是本書的說明,不是標題。

RFC正式標題
RFC 2433Microsoft PPP CHAP Extensions
RFC 2548Microsoft Vendor-specific RADIUS Attributes
RFC 2759Microsoft PPP CHAP Extensions, Version 2
RFC 2865Remote Authentication Dial In User Service (RADIUS)
RFC 2866RADIUS Accounting
RFC 2868RADIUS Attributes for Tunnel Protocol Support
RFC 3079Deriving Keys for use with Microsoft Point-to-Point Encryption (MPPE)
RFC 3162RADIUS and IPv6
RFC 3339Date and Time on the Internet: Timestamps
RFC 3539Authentication, Authorization and Accounting (AAA) Transport Profile
RFC 3579RADIUS (Remote Authentication Dial In User Service) Support For Extensible Authentication Protocol (EAP)
RFC 3748Extensible Authentication Protocol (EAP)
RFC 3986Uniform Resource Identifier (URI): Generic Syntax
RFC 4186Extensible Authentication Protocol Method for Global System for Mobile Communications (GSM) Subscriber Identity Modules (EAP-SIM)
RFC 4187Extensible Authentication Protocol Method for 3rd Generation Authentication and Key Agreement (EAP-AKA)
RFC 4226HOTP: An HMAC-Based One-Time Password Algorithm
RFC 4513Lightweight Directory Access Protocol (LDAP): Authentication Methods and Security Mechanisms
RFC 4514Lightweight Directory Access Protocol (LDAP): String Representation of Distinguished Names
RFC 4515Lightweight Directory Access Protocol (LDAP): String Representation of Search Filters
RFC 4648The Base16, Base32, and Base64 Data Encodings
RFC 5080Common Remote Authentication Dial In User Service (RADIUS) Implementation Issues and Suggested Fixes
RFC 5176Dynamic Authorization Extensions to Remote Authentication Dial In User Service (RADIUS)
RFC 5216The EAP-TLS Authentication Protocol
RFC 5281Extensible Authentication Protocol Tunneled Transport Layer Security Authenticated Protocol Version 0 (EAP-TTLSv0)
RFC 5448Improved Extensible Authentication Protocol Method for 3rd Generation Authentication and Key Agreement (EAP-AKA')
RFC 5997Use of Status-Server Packets in the Remote Authentication Dial In User Service (RADIUS) Protocol
RFC 6238TOTP: Time-Based One-Time Password Algorithm
RFC 6613RADIUS over TCP
RFC 6614Transport Layer Security (TLS) Encryption for RADIUS
RFC 6733Diameter Base Protocol
RFC 6929Remote Authentication Dial In User Service (RADIUS) Protocol Extensions
RFC 6960X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP
RFC 7585Dynamic Peer Discovery for RADIUS/TLS and RADIUS/DTLS Based on the Network Access Identifier (NAI)
RFC 7914The scrypt Password-Based Key Derivation Function
RFC 8907The Terminal Access Controller Access-Control System Plus (TACACS+) Protocol
RFC 9048Improved Extensible Authentication Protocol Method for 3GPP Mobile Network Authentication and Key Agreement (EAP-AKA')
RFC 9190EAP-TLS 1.3: Using the Extensible Authentication Protocol with TLS 1.3
RFC 9887Terminal Access Controller Access-Control System Plus (TACACS+) over TLS 1.3

怎麼重新產生 RFC 清單

$ grep -rhoE 'RFC ?[0-9]{3,5}' rradius-core/src | sed 's/RFC */RFC /' | sort -u
$ grep -rhoE 'RFC ?[0-9]{3,5}' docs/spectra/specs | sed 's/RFC */RFC /' | sort -u

2026-11-23 的結果:第一個指令印出 31 行,其中 RFC 822 是憑證欄位名稱 RFC822Name 被順帶抓到,不是引用 RFC,所以是 30 個編號;第二個指令印出 29 個編號。兩邊的每一個編號都已經歸到本附錄的某一個表。每個新出現的編號都要打開註解所在的程式,確認核心真的實作了,才放進核心實作的 RFC;只是掛點或被拒的,放進程式碼提到、但核心沒有實作的 RFC。

常見錯誤

把用戶端與使用者混為一談。 用戶端是 NAS,寫在 [[radius.clients]];使用者是登入的人,寫在帳號資料表。「用戶端被拒」看 status 的 Discarded: unknown client,「使用者被拒」看認證紀錄的 decision="reject"。

把授權群組當成 LDAP 群組。 tacacs.authorize_groups 依 TACACS+ 設備分組。要依使用者的 LDAP 群組決定權限,是 ldap 處理器的事,見 08。

把計費 spool 與計費記錄檔混為一談。 計費 spool(radius.accounting_spool)是資料庫寫不進去時的暫存,之後會重送;計費記錄檔(radius.accounting_log)是每個計費請求一行的紀錄檔,不會重送。兩者都在 13。

相關章節

使用 Hugo 建立
主題 Stack 由 Jimmy 設計