10. IANA Considerations (IANA 考虑事项)
本章定义了 L2TP 协议需要 IANA(Internet Assigned Numbers Authority,互联网号码分配机构)分配和管理的各种参数。
10.1 AVP Attributes (AVP 属性)
IANA 负责维护 L2TP AVP 属性类型注册表。AVP 属性类型是一个 16 位字段。
注册要求 (Registration Requirements):
- 值范围 0-1023: 由 IETF 共识分配(需要发布 RFC)。
- 值范围 1024-65535: 采用"先到先得"(First Come First Served)策略分配。
已分配的标准 AVP 属性类型 (Assigned Standard AVP Attribute Types):
| 属性类型 | AVP 名称 | 引用 |
|---|---|---|
| 0 | Message Type | RFC 2661 Section 4.4.1 |
| 1 | Result Code | RFC 2661 Section 4.4.2 |
| 2 | Protocol Version | RFC 2661 Section 4.4.3 |
| 3 | Framing Capabilities | RFC 2661 Section 4.4.3 |
| 4 | Bearer Capabilities | RFC 2661 Section 4.4.3 |
| 5 | Tie Breaker | RFC 2661 Section 4.4.3 |
| 6 | Firmware Revision | RFC 2661 Section 4.4.3 |
| 7 | Host Name | RFC 2661 Section 4.4.3 |
| 8 | Vendor Name | RFC 2661 Section 4.4.3 |
| 9 | Assigned Tunnel ID | RFC 2661 Section 4.4.3 |
| 10 | Receive Window Size | RFC 2661 Section 4.4.3 |
| 11 | Challenge | RFC 2661 Section 4.4.3 |
| 12 | Q.931 Cause Code | RFC 2661 Section 4.4.4 |
| 13 | Challenge Response | RFC 2661 Section 4.4.3 |
| 14 | Assigned Session ID | RFC 2661 Section 4.4.4 |
| 15 | Call Serial Number | RFC 2661 Section 4.4.4 |
| 16 | Minimum BPS | RFC 2661 Section 4.4.4 |
| 17 | Maximum BPS | RFC 2661 Section 4.4.4 |
| 18 | Bearer Type | RFC 2661 Section 4.4.4 |
| 19 | Framing Type | RFC 2661 Section 4.4.4 |
| 20 | Packet Processing Delay | RFC 2661 Section 4.4.6 |
| 21 | Called Number | RFC 2661 Section 4.4.4 |
| 22 | Calling Number | RFC 2661 Section 4.4.4 |
| 23 | Sub-Address | RFC 2661 Section 4.4.4 |
| 24 | (Tx) Connect Speed | RFC 2661 Section 4.4.4 |
| 25 | Physical Channel ID | RFC 2661 Section 4.4.4 |
| 26 | Initial Received LCP CONFREQ | RFC 2661 Section 4.4.5 |
| 27 | Last Sent LCP CONFREQ | RFC 2661 Section 4.4.5 |
| 28 | Last Received LCP CONFREQ | RFC 2661 Section 4.4.5 |
| 29 | Proxy Authen Type | RFC 2661 Section 4.4.5 |
| 30 | Proxy Authen Name | RFC 2661 Section 4.4.5 |
| 31 | Proxy Authen Challenge | RFC 2661 Section 4.4.5 |
| 32 | Proxy Authen ID | RFC 2661 Section 4.4.5 |
| 33 | Proxy Authen Response | RFC 2661 Section 4.4.5 |
| 34 | Call Errors | RFC 2661 Section 4.4.6 |
| 35 | ACCM | RFC 2661 Section 4.4.6 |
| 36 | Random Vector | RFC 2661 Section 4.3 |
| 37 | Private Group ID | RFC 2661 Section 4.4.4 |
| 38 | (Rx) Connect Speed | RFC 2661 Section 4.4.4 |
| 39 | Sequencing Required | RFC 2661 Section 4.4.4 |
Vendor-Specific AVPs:
供应商特定的 AVP 使用 Vendor ID 字段(基于 SMI 网络管理私有企业代码)来区分不同供应商的扩展。
10.2 Message Type AVP Values (消息类型 AVP 值)
消息类型 AVP(属性类型 0)的值用于标识 L2TP 控制消息的类型。
已分配的消息类型值 (Assigned Message Type Values):
| 值 | 消息类型 | 缩写 | 引用 |
|---|---|---|---|
| 0 | (Reserved) | ||
| 1 | Start-Control-Connection-Request | SCCRQ | RFC 2661 Section 6.1 |
| 2 | Start-Control-Connection-Reply | SCCRP | RFC 2661 Section 6.2 |
| 3 | Start-Control-Connection-Connected | SCCCN | RFC 2661 Section 6.3 |
| 4 | Stop-Control-Connection-Notification | StopCCN | RFC 2661 Section 6.4 |
| 5 | (Reserved) | ||
| 6 | Hello | HELLO | RFC 2661 Section 6.5 |
| 7 | Outgoing-Call-Request | OCRQ | RFC 2661 Section 6.9 |
| 8 | Outgoing-Call-Reply | OCRP | RFC 2661 Section 6.10 |
| 9 | Outgoing-Call-Connected | OCCN | RFC 2661 Section 6.11 |
| 10 | Incoming-Call-Request | ICRQ | RFC 2661 Section 6.6 |
| 11 | Incoming-Call-Reply | ICRP | RFC 2661 Section 6.7 |
| 12 | Incoming-Call-Connected | ICCN | RFC 2661 Section 6.8 |
| 13 | (Reserved) | ||
| 14 | Call-Disconnect-Notify | CDN | RFC 2661 Section 6.12 |
| 15 | WAN-Error-Notify | WEN | RFC 2661 Section 6.13 |
| 16 | Set-Link-Info | SLI | RFC 2661 Section 6.14 |
注册策略 (Registration Policy):
新的消息类型值的分配需要发布 IETF 标准轨道 RFC 或经过 IESG 批准的信息性 RFC。
10.3 Result Code AVP Values (结果代码 AVP 值)
Result Code AVP(属性类型 1)用于指示控制连接或会话终止的原因。
10.3.1 Result Code Field Values (结果代码字段值)
通用结果代码 (General Result Codes):
| 值 | 含义 | 适用范围 |
|---|---|---|
| 0 | Reserved | |
| 1 | General request to clear control connection | StopCCN |
| 2 | General error | StopCCN, CDN |
| 3 | Control channel already exists | StopCCN |
| 4 | Requester is not authorized | StopCCN |
| 5 | Protocol version not supported | StopCCN |
| 6 | Requester is being shut down | StopCCN |
| 7 | Finite State Machine error | StopCCN |
呼叫断开结果代码 (Call Disconnect Result Codes):
| 值 | 含义 | 适用范围 |
|---|---|---|
| 1 | Lost carrier | CDN |
| 2 | General error | CDN |
| 3 | Administrative reason | CDN |
| 4 | Temporary lack of appropriate facilities | CDN |
| 5 | Permanent lack of appropriate facilities | CDN |
| 6 | Invalid destination | CDN |
| 7 | No carrier detected | CDN |
| 8 | Busy signal | CDN |
| 9 | No dial tone | CDN |
| 10 | Timeout waiting for carrier | CDN |
| 11 | No framing detected | CDN |
10.3.2 Error Code Field Values (错误代码字段值)
错误代码字段提供了关于错误的额外细节信息。
| 值 | 错误消息 |
|---|---|
| 0 | No general error |
| 1 | No control connection exists yet for this pair |
| 2 | Length is wrong |
| 3 | One of the field values was out of range |
| 4 | Insufficient resources to handle this operation now |
| 5 | Invalid Session ID |
| 6 | A generic vendor-specific error occurred |
| 7 | Try another (LNS/LAC) |
| 8 | Session or tunnel was shutdown due to receipt of an unknown AVP with M-bit set |
注册策略:
新的结果代码值和错误代码值需要通过 IETF 共识(需要发布 RFC)进行分配。
10.4 Framing Capabilities & Bearer Capabilities (帧能力和承载能力)
Framing Capabilities AVP(属性类型 3)和 Bearer Capabilities AVP(属性类型 4)使用位掩码来指示支持的能力。
Framing Capabilities 位定义 (Framing Capabilities Bit Definitions):
| 位 | 含义 |
|---|---|
| 0 | Asynchronous Framing supported |
| 1 | Synchronous Framing supported |
| 2-31 | Reserved |
Bearer Capabilities 位定义 (Bearer Capabilities Bit Definitions):
| 位 | 含义 |
|---|---|
| 0 | Analog access supported |
| 1 | Digital access supported |
| 2-31 | Reserved |
注册策略:
新的能力位的分配需要通过 IETF 共识(需要发布 RFC)进行分配。
10.5 Proxy Authen Type AVP Values (代理认证类型 AVP 值)
Proxy Authen Type AVP(属性类型 29)用于指示 LAC 使用的认证类型。
已分配的认证类型值 (Assigned Authen Type Values):
| 值 | 认证类型 | 引用 |
|---|---|---|
| 0 | Reserved | |
| 1 | Textual username/password exchange | RFC 1334 (PAP) |
| 2 | PPP CHAP | RFC 1994 |
| 3 | PPP PAP | RFC 1334 |
| 4 | No Authentication | |
| 5 | Microsoft CHAP Version 1 | RFC 2433 |
| 6 | Reserved | |
| 7 | Microsoft CHAP Version 2 | RFC 2759 |
注册策略:
新的认证类型值的分配采用"先到先得"(First Come First Served)策略。
10.6 AVP Header Bits (AVP 头部位)
AVP 头部的前 6 位用作位掩码来控制 AVP 的行为。
已定义的 AVP 头部位 (Defined AVP Header Bits):
| 位 | 名称 | 含义 | 引用 |
|---|---|---|---|
| 0 | M (Mandatory) | 必须理解此 AVP | RFC 2661 Section 4.1 |
| 1 | H (Hidden) | AVP 值被隐藏 | RFC 2661 Section 4.3 |
| 2-5 | Reserved | 保留,必须设置为 0 | RFC 2661 Section 4.1 |
注册策略:
保留位的分配需要通过标准行动(Standards Action)- 即发布 IETF 标准轨道 RFC。
10.7 L2TP UDP Port (L2TP UDP 端口)
已分配端口 (Assigned Port):
- 端口号: 1701
- 协议: UDP
- 用途: L2TP
- 引用: RFC 2661
IANA 已经为 L2TP 分配了 UDP 端口 1701 用于控制连接和数据会话。
10.8 L2TP Protocol Number (L2TP 协议号)
虽然当前规范定义 L2TP 在 UDP 上运行,但 L2TP 也可以直接在其他数据包传输协议上运行。
IP 协议号:
- L2TP 协议号: 115
- 名称: L2TP
- 引用: RFC 3931(L2TPv3,直接在 IP 上)
IANA 注册表维护 (IANA Registry Maintenance):
IANA 维护以下 L2TP 相关的注册表:
-
L2TP AVP Attributes Registry
-
L2TP Message Types Registry
- 包含所有控制消息类型
-
L2TP Result Codes Registry
- 包含结果代码和错误代码
-
L2TP Proxy Authen Types Registry
- 包含认证类型值
-
L2TP Ports and Protocol Numbers
- UDP 端口和 IP 协议号分配
更新和扩展 (Updates and Extensions):
后续的 RFC 可能会定义新的 AVP、消息类型或其他参数。所有新的分配必须遵循本节定义的注册策略。
重要的扩展包括:
- RFC 3931: Layer Two Tunneling Protocol - Version 3 (L2TPv3)
- RFC 4591: Frame Relay over L2TP
- RFC 5515: Layer Two Tunneling Protocol (L2TP) Access Concentrator Configuration