拨号和接入 : 虚拟专用拨号网络 (VPDN)

L2TP 隧道设置和终止

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 4 月 22 日) | 反馈


目录


简介

本文讨论Layer Two Tunneling Protocol (L2TP)隧道设置和卸载。文档还提供了 PPP 和 L2TP 的汇总。

先决条件

要求

本文档没有任何特定的要求。

使用的组件

本文档中的信息根据Cisco IOS�软件版本12.0(1)T和以上。

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

PPP

PPP 是通过点对点链路传输 L2 和第 3 层 (L3) 流量的对称对等协议。有三个主要组件:

  • 封装

  • 链路控制协议(LCP)

  • 网络控制协议(NCP)

数据报封装在 PPP 中。LCP 允许进行配置选项协商以允许建立链路。对于在链路中运行的每个 L3 协议,都会协商 NCP。

在 PPP 会话的生存期内,链路将经过四个不同的阶段:

  • 链路建立 — 在链路建立阶段中,PPP 使用一个 LCP 函数(该函数必须在链路进入身份验证阶段之前完成并声明为 open),如果适用,还会协商网络层的开端。另外,还使用 LCP 终止 PPP 链路。

  • 身份验证 — 身份验证阶段是特定于实施的阶段,不是从 LCP 移动到 NCP 的强制需求。如果在 LCP 阶段协商并达成协议,远程对等体必须标识自身并在 PPP 移至网络层之前传递协定的身份验证方法。

  • 网络层 — NCP 协商可确保两个对等体就 L3 协议的特性达成协议。对于 IP,控制协议称为 IP 控制协议 (IPCP)。除对等体之间的协商外,还有分配的元素。这对于 Microsoft Windows 类型的远程访问客户端十分常见,这些客户端没有分配的 IP 地址,而是依靠服务提供商在连接时分配 IP 地址。

  • 链路终止 — 在呼叫的生命周期内,随时可以进入链路终止阶段。LCP 用于提出终止请求。

L2TP

L2TP 扩展了 PPP 的点对点性质。L2TP 为采用隧道的 PPP 帧传输提供了一种封装方法,允许 PPP 终点通过分组交换网络建立隧道。在远程访问类型的情况下最常部署 L2TP,这些情况使用 Internet 提供 Intranet 类型的服务。概念是那虚拟专用网络(VPN)。

L2TP两个主要的物理单元是L2TP接入集中器(LAC)和L2TP网络服务器(LNS) :

  • LAC —LAC是作为隧道终点的一端的对等体对LNS。LAC 将终止远程 PPP 连接并处于远程与 LNS 之间。转发的数据包通过 PPP 连接进出远程连接。进出 LNS 的数据包通过 L2TP 隧道进行转发。

  • LNS —LNS是作为隧道终点的一端的对等体对LAC。LNS 是 LAC PPP 隧道会话的终点。它用于聚集多个采用 LAC 隧道的 PPP 会话并进入专用网络。

L2TP 使用以下两种不同的消息类型:

  • 控制消息 — L2TP 通过单独的控制信道和数据信道传递控制消息和数据消息。带内控制信道用于传递顺序控制连接管理、呼叫管理、错误报告和会话控制消息。控制连接的建立并非特定于 LAC 或 LNS,而是特定于与控制连接建立相关的隧道发送方和接收方。在隧道终点之间采用共享密钥身份验证方法。

  • 数据消息 — 数据消息用于封装发送到 L2TP 隧道中的 PPP 帧。

L2TP使用已注册用户数据报协议(UDP)端口1701,并且全部的L2TP数据包在UDP数据包内被封装。根据正常 UDP 操作,隧道发起方选择一个可用的 UDP 端口并将端口号 1701 发送到 UDP 目标。在回复中,目标端口与传入的 UDP 报头中使用的源端口号相同。源端口是根据找到的任何空闲端口设置的。建立源端口和目标端口后,这两个端口在隧道使用过程中必须保持不变。在 Cisco IOS 软件中,源端口号和目标端口号总是设置为 UDP 端口号 1701。

注意: 第 2 层转发 (L2F) 协议与 L2TP 共享同一个 UDP 端口号。报头中的“Version”字段可用于区分这两个协议。值为 1 表示 L2F,值为 2 表示 L2TP。

PPP 和 L2TP 流汇总

必须先建立控制连接和会话,才能通过隧道转发 PPP 帧。

成功建立控制信道后,将为每个 PPP 连接创建会话。会话建立是定向的,与 LAC 和 LNS 有关。对于传入呼叫,LAC 请求 LNS 接受会话。对于传出呼叫,LNS 要求 LAC 接受会话。

本文档的 PPP/L2TP 连接顺序部分详细说明了当远程访问用户向 LAC 发送呼叫时如何设置 PPP 和 L2TP 呼叫。此示例使用拨号号码识别服务(DNIS)为了发起L2TP通道,虽然您能为此也使用域名。顺序显示从 SOHO 2500 路由器开始 PPP 会话、远程访问用户与 LAC 之间的 LCP 协商,以及部分身份验证。随后,LAC 继续建立 L2TP 隧道和隧道内的会话。为 LAC 与 LNS 之间的每个 PPP 连接建立一个会话。L2TP 在所有传出消息中使用对等体隧道和会话标识符,以实现 PPP 连接的多路复用和多路分用。这些标识在各自的控制连接和会话建立阶段进行分配和交换。隧道和会话 ID 仅具有本地意义。对于相同的隧道和会话,隧道终点具有不同的标识符。

注意: 值 0 具有独特的意义,只有隧道和会话标识符仍要进行分配时才能使用此值。

建立隧道后,将完成远程访问用户与 LNS 之间的 PPP 身份验证过程。LAC 继续接收 PPP 帧。链路构建帧和循环冗余冗余校验(CRC)删除,被封装到LT2P,并且转发到对LNS的通道。在那里将接收 L2TP 数据包,并按照已在本地 PPP 接口终止该数据包的方式对其进行处理。进行 PPP NCP 协商,然后将 IPCP 声明为 open。此时连接已完成。

PPP/L2TP 连接顺序

以下是事件连接顺序:

  1. 远程用户建立 PPP 连接。LAC 接受连接。建立 PPP 链路。

  2. 在远程用户与 LAC 之间协商 LCP。LAC问题质询握手验证协议(CHAP)挑战为了执行远程用户的一部分验证。在会话建立过程中,回复被发送到 LNS。回复被发送作为属性值对(AVP) 33在Incoming-Call-Connected (ICCN)的代理验证答复。

  3. DNIS 用于确定用户是否是虚拟专用拨号网络 (VPDN) 客户端。

  4. 由于拨叫号码 (614629) 没有现有隧道,因此必须创建新的隧道。查询 RADIUS,并将隧道信息下载到 LAC。

  5. 开始控制连接。隧道处于 IDLE 状态:

    • 通道发起者(在这种情况下, LAC)发送Start-Control-Connection-Request (SCCRQ)对LNS。SCCRQ 包含一个 AVP 11 质询,指明 LAC 需要采用 CHAP 式身份验证对隧道进行身份验证。两个隧道终点都持有同一个密钥。隧道此时处于 WAIT-CTL-REPLY 状态。

    • LNS能启动通道,因此LNS回复与Start-Control-Connection-Reply (SCCRP)。SCCRP 包含一个 AVP 11 质询和一个回复 SCCRQ 的 AVP 13 质询响应。隧道此时处于 WAIT-CTL-REPLY 状态。

    • LAC回应启动控制连接已连接(SCCCN)消息。SCCCN 包含一个回复 SCCRP 的 AVP 13。隧道此时处于 Established 状态。

    • LNS传送Zero-Length Body (ZLB)信息对LAC。ZLB 消息是一种顺序确认。隧道此时处于 Established 状态。

  6. 此时隧道身份验证完成,隧道已建立。会话此时处于 IDLE 状态。

  7. 隧道已存在,现在执行在隧道内建立会话的三向交换:

    • LAC发送与参数信息的来话请求(ICRQ)会话的。会话此时处于 Wait Reply 状态。

    • LNS发送包含会话ID的来话应答(ICRP)。会话此时处于 Wait Connect 状态。

    • LAC 发送一个 ICCN 并为 LNS 提供应答呼叫的其他信息。此数据包括从 LAC 与远程用户执行的协商中获得的 LCP 信息。会话此时处于 Established 状态。

    • LNS 向 LAC 发送一个 ZLB 消息(顺序确认)。会话此时处于 Established 状态。

  8. 建立会话后,在 LNS 创建一个虚拟访问接口。ICCN 中传送的 LCP 配置信息被强制用于虚拟访问接口的 PPP 堆栈。此数据包括部分身份认证信息。

  9. LNS 生成一个身份验证质询。重放 ICCN 中传送的代理身份验证响应 AVP 33。

  10. 正常验证、授权和统计(AAA)或PPP认证和授权发生。

  11. 为每个用户的身份验证和授权发送一个 RADIUS Access-Request。

  12. RADIUS Access-Accept 被接收。

    注意: RADIUS 已配置为允许远程用户在传入 IPCP Configure-Request 中提供的 IP 地址。

  13. CHAP 成功消息发送给远程用户。

  14. PPP IPCP 协商完成并声明为 OPEN。在远程接口安装主机路由。远程用户此时已连接,可以开始传输流量。

PPP 和 L2TP 连接呼叫流

l2tp_23980a.gif

显示 PPP 和 L2TP 呼叫建立的 LAC 调试结果

Jan  1 00:04:10.235: %LINK-3-UPDOWN: Interface Serial0:0, 
changed state to up 
Jan  1 00:04:10.455: Se0:0 PPP: Treating connection as a callin 
Jan  1 00:04:10.455: Se0:0 PPP: Phase is ESTABLISHING, 
Passive Open [0 sess, 0 load] 
Jan  1 00:04:10.455: Se0:0 CHAP: Using alternate hostname 5300-1 
Jan  1 00:04:10.455: Se0:0 LCP: State is Listen 
Jan  1 00:04:10.455: Se0:0 LCP: I CONFREQ [Listen] id 118 len 10 
Jan  1 00:04:10.455: Se0:0 LCP:    MagicNumber 0x6EE4E865 (0x05066EE4E865) 
Jan  1 00:04:10.455: Se0:0 CHAP: Using alternate hostname 5300-1 
Jan  1 00:04:10.455: Se0:0 LCP: O CONFREQ [Listen] id 11 len 28 
Jan  1 00:04:10.455: Se0:0 LCP:    AuthProto CHAP (0x0305C22305) 
Jan  1 00:04:10.455: Se0:0 LCP:    MagicNumber 0x109D08F2 (0x0506109D08F2) 
Jan  1 00:04:10.455: Se0:0 LCP:    MRRU 1524 (0x110405F4) 
Jan  1 00:04:10.455: Se0:0 LCP:    EndpointDisc 1 Local (0x130901353330302D31) 
Jan  1 00:04:10.455: Se0:0 LCP: O CONFACK [Listen] id 118 len 10 
Jan  1 00:04:10.455: Se0:0 LCP:    MagicNumber 0x6EE4E865 (0x05066EE4E865) 
Jan  1 00:04:10.495: Se0:0 LCP: I CONFREJ [ACKsent] id 11 len 17 
Jan  1 00:04:10.495: Se0:0 LCP:    MRRU 1524 (0x110405F4) 
Jan  1 00:04:10.495: Se0:0 LCP:    EndpointDisc 1 Local (0x130901353330302D31) 
Jan  1 00:04:10.495: Se0:0 LCP: O CONFREQ [ACKsent] id 12 len 15 
Jan  1 00:04:10.495: Se0:0 LCP:    AuthProto CHAP (0x0305C22305) 
Jan  1 00:04:10.495: Se0:0 LCP:    MagicNumber 0x109D08F2 (0x0506109D08F2) 
Jan  1 00:04:10.527: Se0:0 LCP: I CONFACK [ACKsent] id 12 len 15 
Jan  1 00:04:10.527: Se0:0 LCP:    AuthProto CHAP (0x0305C22305) 
Jan  1 00:04:10.527: Se0:0 LCP:    MagicNumber 0x109D08F2 (0x0506109D08F2) 
Jan  1 00:04:10.527: Se0:0 LCP: State is Open 
Jan  1 00:04:10.527: Se0:0 PPP: Phase is AUTHENTICATING, 
by this end [0 sess, 0 load] 
Jan  1 00:04:10.527: Se0:0 CHAP: Using alternate hostname 5300-1 
Jan  1 00:04:10.527: Se0:0 CHAP: O CHALLENGE id 6 len 27 from "5300-1" 
Jan  1 00:04:10.555: Se0:0 CHAP: I RESPONSE id 6 len 27 from "2500-1" 
Jan  1 00:04:10.555: Se0:0 PPP: Phase is FORWARDING [0 sess, 0 load] 
Jan  1 00:04:10.555: Se0:0 VPDN: Got DNIS string 614629 
Jan  1 00:04:10.555: Se0:0 VPDN: Looking for tunnel -- dnis:614629 -- 
Jan  1 00:04:10.555: Serial0:0 AAA/AUTHOR/VPDN (1692520761): Port='Serial0:0' 
list='default' service=NET 
Jan  1 00:04:10.555: AAA/AUTHOR/VPDN: Serial0:0 (1692520761) user='dnis:614629' 
Jan  1 00:04:10.555: Serial0:0 AAA/AUTHOR/VPDN (1692520761): send AV service=ppp 
Jan  1 00:04:10.555: Serial0:0 AAA/AUTHOR/VPDN (1692520761): send AV protocol=vpdn 
Jan  1 00:04:10.555: Serial0:0 AAA/AUTHOR/VPDN (1692520761): found list "default" 
Jan  1 00:04:10.555: Serial0:0 AAA/AUTHOR/VPDN (1692520761): Method=NSA_LAB (radius) 
Jan  1 00:04:10.559: RADIUS: Initial Transmit Serial0:0 id 18 10.51.6.3:1645, 
Access-Request, len 112 
Jan  1 00:04:10.559:         Attribute 4 6 0A330644 
Jan  1 00:04:10.559:         Attribute 5 6 00000000 
Jan  1 00:04:10.559:         Attribute 26 17 00000009020B5365 
Jan  1 00:04:10.559:         Attribute 61 6 00000002 
Jan  1 00:04:10.559:         Attribute 1 13 646E6973 
Jan  1 00:04:10.559:         Attribute 30 8 36313436 
Jan  1 00:04:10.559:         Attribute 31 12 32303835 
Jan  1 00:04:10.559:         Attribute 2 18 D0A81832 
Jan  1 00:04:10.559:         Attribute 6 6 00000005 
Jan  1 00:04:10.559: RADIUS: Received from id 18 10.51.6.3:1645, 
Access-Accept, len 156 
Jan  1 00:04:10.559:         Attribute 6 6 00000005 
Jan  1 00:04:10.559:         Attribute 26 29 0000000901177670 
Jan  1 00:04:10.559:         Attribute 26 26 0000000901147670 
Jan  1 00:04:10.559:         Attribute 26 36 00000009011E7670 
Jan  1 00:04:10.559:         Attribute 26 39 0000000901217670 
Jan  1 00:04:10.563: RADIUS: saved authorization data 
for user 626A0C10 at 62258960 
Jan  1 00:04:10.563: RADIUS: cisco AVPair "vpdn:tunnel-type=l2tp" 
Jan  1 00:04:10.563: RADIUS: cisco AVPair "vpdn:tunnel-id=hgw" 
Jan  1 00:04:10.563: RADIUS: cisco AVPair "vpdn:ip-addresses=10.51.6.82" 
Jan  1 00:04:10.563: RADIUS: cisco AVPair "vpdn:l2tp-tunnel-password=hello" 
Jan  1 00:04:10.563: AAA/AUTHOR (1692520761): 
Post authorization status = PASS_ADD 
Jan  1 00:04:10.563: AAA/AUTHOR/VPDN: Processing AV service=ppp 
Jan  1 00:04:10.563: AAA/AUTHOR/VPDN: Processing AV protocol=vpdn 
Jan  1 00:04:10.563: AAA/AUTHOR/VPDN: Processing AV tunnel-type=l2tp 
Jan  1 00:04:10.563: AAA/AUTHOR/VPDN: Processing AV tunnel-id=hgw 
Jan  1 00:04:10.563: AAA/AUTHOR/VPDN: Processing AV ip-addresses=10.51.6.82 
Jan  1 00:04:10.563: AAA/AUTHOR/VPDN: Processing AV l2tp-tunnel-password=hello 
Jan  1 00:04:10.563: Se0:0 VPDN/RPMS/: Got tunnel info for dnis:614629 
Jan  1 00:04:10.563: Se0:0 VPDN/RPMS/:   LAC hgw 
Jan  1 00:04:10.563: Se0:0 VPDN/RPMS/:   l2tp-busy-disconnect yes 
Jan  1 00:04:10.563: Se0:0 VPDN/RPMS/:   l2tp-tunnel-password xxxxxx 
Jan  1 00:04:10.563: Se0:0 VPDN/RPMS/:   IP 10.51.6.82 
Jan  1 00:04:10.563: Se0:0 VPDN/: curlvl 1 Address 0: 10.51.6.82,       
priority 1 
Jan  1 00:04:10.563: Se0:0 VPDN/: Select non-active address 10.51.6.82, 
priority 1 
Jan  1 00:04:10.567: Tnl 17688 L2TP: SM State idle 
Jan  1 00:04:10.567: Tnl 17688 L2TP: O SCCRQ 
Jan  1 00:04:10.567: Tnl 17688 L2TP: O SCCRQ, flg TLS, ver 2, 
len 128, tnl 0, cl 0, ns 0, nr 0 
         C8 02 00 80 00 00 00 00 00 00 00 00 80 08 00 00 
         00 00 00 01 80 08 00 00 00 02 01 00 80 0A 00 00 
         00 03 00 00 00 03 80 0A 00 00 00 04 00 00 00 ... 
Jan  1 00:04:10.567: Tnl 17688 L2TP: Tunnel state change from idle 
to wait-ctl-reply 
Jan  1 00:04:10.567: Tnl 17688 L2TP: SM State wait-ctl-reply 
Jan  1 00:04:10.567: Se0:0 VPDN: Find LNS process created 
Jan  1 00:04:10.567: Se0:0 VPDN: Forward to address 10.51.6.82 
Jan  1 00:04:10.567: Se0:0 VPDN: Pending 
Jan  1 00:04:10.567: Se0:0 VPDN: Process created 
Jan  1 00:04:10.655: Tnl 17688 L2TP: Parse  AVP 0, len 8, flag 0x8000 (M) 
Jan  1 00:04:10.655: Tnl 17688 L2TP: Parse SCCRP 
Jan  1 00:04:10.655: Tnl 17688 L2TP: Parse  AVP 2, len 8, flag 0x8000 (M) 
Jan  1 00:04:10.655: Tnl 17688 L2TP: Protocol Ver 256 
Jan  1 00:04:10.655: Tnl 17688 L2TP: Parse  AVP 3, len 10, flag 0x8000 (M) 
Jan  1 00:04:10.655: Tnl 17688 L2TP: Framing Cap 0x3 
Jan  1 00:04:10.655: Tnl 17688 L2TP: Parse  AVP 4, len 10, flag 0x8000 (M) 
Jan  1 00:04:10.655: Tnl 17688 L2TP: Bearer Cap 0x3 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Parse  AVP 6, len 8, flag 0x0 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Firmware Ver 0x1120 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Parse  AVP 7, len 13, flag 0x8000 (M) 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Hostname l2tp-gw 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Parse  AVP 8, len 25, flag 0x0 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Vendor Name Cisco Systems, Inc. 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Parse  AVP 9, len 8, flag 0x8000 (M) 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Assigned Tunnel ID 55270 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Parse  AVP 10, len 8, flag 0x8000 (M) 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Rx Window Size 300 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Parse  AVP 11, len 22, flag 0x8000 (M) 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Chlng 98B296C28429E7ADC767237A45F31040 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Parse  AVP 13, len 22, flag 0x8000 (M) 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Chlng Resp 7C358F7A7BA21957C07801195DCADFA6 
Jan  1 00:04:10.659: Tnl 17688 L2TP: No missing AVPs in SCCRP 
Jan  1 00:04:10.659: Tnl 17688 L2TP: I SCCRP, flg TLS, ver 2,  
len 154, tnl 17688, cl 0, ns 0, nr 1 
         C8 02 00 9A 45 18 00 00 00 00 00 01 80 08 00 00 
         00 00 00 02 80 08 00 00 00 02 01 00 80 0A 00 00 
         00 03 00 00 00 03 80 0A 00 00 00 04 00 00 00 ... 
Jan  1 00:04:10.659: Tnl 17688 L2TP: I SCCRP from l2tp-gw 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Got a challenge from remote peer, 
l2tp-gw 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Got a response from remote peer, l2tp-gw 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Tunnel Authentication success 
Jan  1 00:04:10.659: Tnl 17688 L2TP: Tunnel state change from wait-ctl-reply 
to established 
Jan  1 00:04:10.663: Tnl 17688 L2TP: O SCCCN  to l2tp-gw tnlid 55270 
Jan  1 00:04:10.663: Tnl 17688 L2TP: O SCCCN, flg TLS, ver 2, len 42, 
tnl 55270, cl 0, ns 1, nr 1 
         C8 02 00 2A D7 E6 00 00 00 01 00 01 80 08 00 00 
         00 00 00 03 80 16 00 00 00 0D 96 39 53 18 41 AC 
         22 E3 10 3E 20 8E F7 D9 09 89 
Jan  1 00:04:10.663: Tnl 17688 L2TP: SM State established 
Jan  1 00:04:10.663: Tnl/Cl 17688/7 L2TP: Session FS enabled 
Jan  1 00:04:10.663: Tnl/Cl 17688/7 L2TP: Session state change from idle 
to wait-for-tunnel 
Jan  1 00:04:10.663: Se0:0 Tnl/Cl 17688/7 L2TP: Create session 
Jan  1 00:04:10.663: Tnl 17688 L2TP: SM State established 
Jan  1 00:04:10.663: Se0:0 Tnl/Cl 17688/7 L2TP: O ICRQ to l2tp-gw 55270/0 
Jan  1 00:04:10.663: Se0:0 Tnl/Cl 17688/7 L2TP: O ICRQ, flg TLS, 
ver 2, len 91, tnl 55270, cl 0, ns 2, nr 1 
         C8 02 00 5B D7 E6 00 00 00 02 00 01 80 08 00 00 
         00 00 00 0A 80 08 00 00 00 0E 00 07 80 0A 00 00 
         00 0F D1 14 C7 C5 80 0A 00 00 00 12 00 00 00 ... 
Jan  1 00:04:10.667: Se0:0 Tnl/Cl 17688/7 L2TP: Session state change from 
wait-for-tunnel to wait-reply 
Jan  1 00:04:10.703: Tnl 17688 L2TP: I ZLB ctrl ack, flg TLS, ver 2, 
len 12, tnl 17688, cl 0, ns 1, nr 2 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: Parse  AVP 0, len 8, 
flag 0x8000 (M) 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: Parse ICRP 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: Parse  AVP 14, len 8, 
flag 0x8000 (M) 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: Assigned Call ID 45 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: No missing AVPs in ICRP 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: I ICRP, flg TLS, 
ver 2, len 28, tnl 17688, cl 7, ns 1, nr 3 
         C8 02 00 1C 45 18 00 07 00 01 00 03 80 08 00 00 
         00 00 00 0B 80 08 00 00 00 0E 00 2D 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: O ICCN to l2tp-gw 55270/45 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: O ICCN, flg TLS, ver 2, 
len 151, tnl 55270, cl 45, ns 3, nr 2 
         C8 02 00 97 D7 E6 00 2D 00 03 00 02 80 08 00 00 
         00 00 00 0C 80 0A 00 00 00 18 00 00 FA 00 00 0A 
         00 00 00 26 00 00 FA 00 80 0A 00 00 00 13 00 ... 
Jan  1 00:04:10.795: Se0:0 Tnl/Cl 17688/7 L2TP: Session state change 
from wait-reply to established 
Jan  1 00:04:10.899: Tnl 17688 L2TP: I ZLB ctrl ack, flg TLS, ver 2, 
len 12, tnl 17688, cl 0, ns 2, nr 4 
Jan  1 00:04:11.667: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0:0, 
changed state to up 
Jan  1 00:04:16.239: %ISDN-6-CONNECT: Interface Serial0:0 is now connected to 
2085730592 2500-1

显示 PPP 和 L2TP 呼叫建立的 LNS 调试结果

Jan  1 00:04:10.916: L2X: Parse  AVP 0, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:10.920: L2X: Parse SCCRQ 
Jan  1 00:04:10.920: L2X: Parse  AVP 2, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:10.924: L2X: Protocol Ver 256 
Jan  1 00:04:10.924: L2X: Parse  AVP 3, len 10, flag 0x0x8000 (M) 
Jan  1 00:04:10.928: L2X: Framing Cap 0x0x3 
Jan  1 00:04:10.928: L2X: Parse  AVP 4, len 10, flag 0x0x8000 (M) 
Jan  1 00:04:10.932: L2X: Bearer Cap 0x0x3 
Jan  1 00:04:10.932: L2X: Parse  AVP 6, len 8, flag 0x0x0 
Jan  1 00:04:10.936: L2X: Firmware Ver 0x0x1130 
Jan  1 00:04:10.936: L2X: Parse  AVP 7, len 9, flag 0x0x8000 (M) 
Jan  1 00:04:10.940: L2X: Hostname hgw 
Jan  1 00:04:10.940: L2X: Parse  AVP 8, len 25, flag 0x0x0 
Jan  1 00:04:10.944: L2X: Vendor Name Cisco Systems, Inc. 
Jan  1 00:04:10.948: L2X: Parse  AVP 9, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:10.952: L2X: Assigned Tunnel ID 17688 
Jan  1 00:04:10.952: L2X: Parse  AVP 10, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:10.956: L2X: Rx Window Size 800 
Jan  1 00:04:10.956: L2X: Parse  AVP 11, len 22, flag 0x0x8000 (M) 
Jan  1 00:04:10.960: L2X: Chlng 545A2343FBE20EA08BCA7B56E4A7D29E 
Jan  1 00:04:10.964: L2X: No missing AVPs in SCCRQ 
Jan  1 00:04:10.968: L2X: I SCCRQ, flg TLS, ver 2, len 128, 
tnl 0, cl 0, ns 0, nr 0 contiguous pak, size 128 
         C8 02 00 80 00 00 00 00 00 00 00 00 80 08 00 00 
         00 00 00 01 80 08 00 00 00 02 01 00 80 0A 00 00 
         00 03 00 00 00 03 80 0A 00 00 00 04 00 00 00 ... 
Jan  1 00:04:10.975: L2TP: I SCCRQ from hgw tnl 17688 
Jan  1 00:04:10.983: Tnl 55270 L2TP: Got a challenge in SCCRQ, hgw 
Jan  1 00:04:10.983: Tnl 55270 L2TP: New tunnel created for remote hgw, 
address 10.51.6.68 
Jan  1 00:04:10.987: Tnl 55270 L2TP: O SCCRP  to hgw tnlid 17688 
Jan  1 00:04:10.991: Tnl 55270 L2TP: O SCCRP, flg TLS, ver 2, 
len 154, tnl 17688, cl 0, ns 0, nr 1 
Jan  1 00:04:10.999: contiguous buffer, size 154 
         C8 02 00 9A 45 18 00 00 00 00 00 01 80 08 00 00 
         00 00 00 02 80 08 00 00 00 02 01 00 80 0A 00 00 
         00 03 00 00 00 03 80 0A 00 00 00 04 00 00 00 ... 
Jan  1 00:04:11.003: Tnl 55270 L2TP: Tunnel state change from idle 
to wait-ctl-reply 
Jan  1 00:04:11.019: Tnl 55270 L2TP: Parse  AVP 0, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:11.019: Tnl 55270 L2TP: Parse SCCCN 
Jan  1 00:04:11.023: Tnl 55270 L2TP: Parse  AVP 13, len 22, flag 0x0x8000 (M) 
Jan  1 00:04:11.023: Tnl 55270 L2TP: Chlng Resp 9639531841AC22E3103E208EF7D90989 
Jan  1 00:04:11.031: Tnl 55270 L2TP: No missing AVPs in SCCCN 
Jan  1 00:04:11.031: Tnl 55270 L2TP: I SCCCN, flg TLS, ver 2, len 42, 
tnl 55270, cl 0, ns 1, nr 1 contiguous pak, size 42 
         C8 02 00 2A D7 E6 00 00 00 01 00 01 80 08 00 00 
         00 00 00 03 80 16 00 00 00 0D 96 39 53 18 41 AC 
         22 E3 10 3E 20 8E F7 D9 09 89 
Jan  1 00:04:11.043: Tnl 55270 L2TP: O ZLB ctrl ack, flg TLS, ver 2, 
len 12, tnl 17688, cl 0, ns 1, nr 2 
Jan  1 00:04:11.047: contiguous buffer, size 12 
         C8 02 00 0C 45 18 00 00 00 01 00 02 
Jan  1 00:04:11.051: Tnl 55270 L2TP: I SCCCN from hgw tnl 17688 
Jan  1 00:04:11.055: Tnl 55270 L2TP: Got a Challenge Response in SCCCN from hgw 
Jan  1 00:04:11.055: Tnl 55270 L2TP: Tunnel Authentication success 
Jan  1 00:04:11.059: Tnl 55270 L2TP: Tunnel state change from wait-ctl-reply 
to established 
Jan  1 00:04:11.063: Tnl 55270 L2TP: SM State established 
Jan  1 00:04:11.067: Tnl 55270 L2TP: Parse  AVP 0, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:11.071: Tnl 55270 L2TP: Parse ICRQ 
Jan  1 00:04:11.071: Tnl 55270 L2TP: Parse  AVP 14, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:11.075: Tnl 55270 L2TP: Assigned Call ID 7 
Jan  1 00:04:11.075: Tnl 55270 L2TP: Parse  AVP 15, len 10, flag 0x0x8000 (M) 
Jan  1 00:04:11.079: Tnl 55270 L2TP: Serial Number 
Jan  1 00:04:11.083: Tnl 55270 L2TP: Parse  AVP 18, len 10, flag 0x0x8000 (M) 
Jan  1 00:04:11.083: Tnl 55270 L2TP: Bearer Type 1 
Jan  1 00:04:11.087: Tnl 55270 L2TP: Parse  AVP 22, len 16, flag 0x0x8000 (M) 
Jan  1 00:04:11.087: Tnl 55270 L2TP: Calling Number 2085730592 
Jan  1 00:04:11.095: Tnl 55270 L2TP: Parse  AVP 21, len 12, flag 0x0x8000 (M) 
Jan  1 00:04:11.095: Tnl 55270 L2TP: Called Number 614629 
Jan  1 00:04:11.099: Tnl 55270 L2TP: Parse Cisco AVP 100, len 15, flag 0x0x0 
Jan  1 00:04:11.102: Tnl 55270 L2TP: Client NAS Port Serial0:0 
Jan  1 00:04:11.106: Tnl 55270 L2TP: No missing AVPs in ICRQ 
Jan  1 00:04:11.106: Tnl 55270 L2TP: I ICRQ, flg TLS, ver 2, len 91, 
tnl 55270, cl 0, ns 2, nr 1 contiguous pak, size 91 
         C8 02 00 5B D7 E6 00 00 00 02 00 01 80 08 00 00 
         00 00 00 0A 80 08 00 00 00 0E 00 07 80 0A 00 00 
         00 0F D1 14 C7 C5 80 0A 00 00 00 12 00 00 00 ... 
Jan  1 00:04:11.118: Tnl 55270 L2TP: I ICRQ from hgw tnl 17688 
Jan  1 00:04:11.122: Tnl/Cl 55270/45 L2TP: Session FS enabled 
Jan  1 00:04:11.126: Tnl/Cl 55270/45 L2TP: Session state change 
from idle to wait-connect 
Jan  1 00:04:11.126: Tnl/Cl 55270/45 L2TP: New session created 
Jan  1 00:04:11.130: Tnl/Cl 55270/45 L2TP: O ICRP to hgw 17688/7 
Jan  1 00:04:11.134: Tnl/Cl 55270/45 L2TP: O ICRP, flg TLS, ver 2, 
len 28, tnl 17688, cl 7, ns 1, nr 3 
Jan  1 00:04:11.138: contiguous buffer, size 28 
         C8 02 00 1C 45 18 00 07 00 01 00 03 80 08 00 00 
         00 00 00 0B 80 08 00 00 00 0E 00 2D 
Jan  1 00:04:11.154: Tnl/Cl 55270/45 L2TP: Parse  AVP 0, len 8, 
flag 0x0x8000 (M) 
Jan  1 00:04:11.158: Tnl/Cl 55270/45 L2TP: Parse ICCN 
Jan  1 00:04:11.162: Tnl/Cl 55270/45 L2TP: Parse  AVP 24, len 10, 
flag 0x0x8000 (M) 
Jan  1 00:04:11.162: Tnl/Cl 55270/45 L2TP: Connect Speed 64000 
Jan  1 00:04:11.166: Tnl/Cl 55270/45 L2TP: Parse  AVP 38, len 10, flag 0x0x0 
Jan  1 00:04:11.166: Tnl/Cl 55270/45 L2TP: Rx Speed 64000 
Jan  1 00:04:11.170: Tnl/Cl 55270/45 L2TP: Parse  AVP 19, len 10, 
flag 0x0x8000 (M) 
Jan  1 00:04:11.174: Tnl/Cl 55270/45 L2TP: Framing Type 2 
Jan  1 00:04:11.174: Tnl/Cl 55270/45 L2TP: Parse  AVP 27, len 17, flag 0x0x0 
Jan  1 00:04:11.178: Tnl/Cl 55270/45 L2TP: Last Sent LCPREQ 
0305C223050506109D08F2 
Jan  1 00:04:11.182: Tnl/Cl 55270/45 L2TP: Parse  AVP 28, len 12, flag 0x0x0 
Jan  1 00:04:11.186: Tnl/Cl 55270/45 L2TP: Last Rx LCPREQ 05066EE4E865 
Jan  1 00:04:11.190: Tnl/Cl 55270/45 L2TP: Parse  AVP 31, len 22, flag 0x0x0 
Jan  1 00:04:11.194: Tnl/Cl 55270/45 L2TP: Proxy Auth Chal 
5D0D008CB1677CF8BC354556321A7A74 
Jan  1 00:04:11.198: Tnl/Cl 55270/45 L2TP: Parse  AVP 32, len 8, flag 0x0x0 
Jan  1 00:04:11.202: Tnl/Cl 55270/45 L2TP: Proxy Auth ID 6 
Jan  1 00:04:11.206: Tnl/Cl 55270/45 L2TP: Parse  AVP 30, len 12, flag 0x0x0 
Jan  1 00:04:11.206: Tnl/Cl 55270/45 L2TP: Proxy Auth Name 2500-1 
Jan  1 00:04:11.210: Tnl/Cl 55270/45 L2TP: Parse  AVP 33, len 22, 
flag 0x0x8000 (M) 
Jan  1 00:04:11.214: Tnl/Cl 55270/45 L2TP: Proxy Auth Resp 
CA1CC2E4FA6899E8DF1B695C0A80883E 
Jan  1 00:04:11.222: Tnl/Cl 55270/45 L2TP: Parse  AVP 29, len 8, flag 0x0x0 
Jan  1 00:04:11.222: Tnl/Cl 55270/45 L2TP: Proxy Auth Type 2 
Jan  1 00:04:11.225: Tnl/Cl 55270/45 L2TP: No missing AVPs in ICCN 
Jan  1 00:04:11.229: Tnl/Cl 55270/45 L2TP: I ICCN, flg TLS, ver 2, 
len 151, tnl 55270, cl 45, ns 3, nr 2 contiguous pak, size 151 
         C8 02 00 97 D7 E6 00 2D 00 03 00 02 80 08 00 00 
         00 00 00 0C 80 0A 00 00 00 18 00 00 FA 00 00 0A 
         00 00 00 26 00 00 FA 00 80 0A 00 00 00 13 00 ... 
Jan  1 00:04:11.241: Tnl/Cl 55270/45 L2TP: O ZLB ctrl ack, flg TLS, 
ver 2, len 12, tnl 17688, cl 0, ns 2, nr 4 
Jan  1 00:04:11.245: contiguous buffer, size 12 
         C8 02 00 0C 45 18 00 00 00 02 00 04 
Jan  1 00:04:11.249: Tnl/Cl 55270/45 L2TP: I ICCN from hgw tnl 17688, cl 7 
Jan  1 00:04:11.253: Tnl/Cl 55270/45 L2TP: Session state change from 
wait-connect to established 
Jan  1 00:04:11.257: Vi4 VTEMPLATE: Hardware address 0030.94fe.1bbf 
Jan  1 00:04:11.257: Vi4 VPDN: Virtual interface created for 2500-1 
Jan  1 00:04:11.261: Vi4 PPP: Phase is DOWN, Setup 
Jan  1 00:04:11.261: Vi4 VPDN: Clone from Vtemplate 1 filterPPP=0 blocking 
Jan  1 00:04:11.265: Vi4 VTEMPLATE: Has a new cloneblk vtemplate, 
now it has vtemplate 
Jan  1 00:04:11.269: Vi4 VTEMPLATE: 
************* CLONE VACCESS4 ***************** 
Jan  1 00:04:11.273: Vi4 VTEMPLATE: Clone from Virtual-Template1 
interface Virtual-Access4 
default ip address 
no ip address 
encap ppp 
ip unnumbered Ethernet0 
no peer default ip address 
ppp authentication chap vpdn 
ppp authorization vpdn 
peer default ip address pool default 
ppp mu 
end 
  
Jan  1 00:04:12.892: %LINK-3-UPDOWN: Interface Virtual-Access4, 
changed state to up 
Jan  1 00:04:12.908: Vi4 PPP: Using set call direction 
Jan  1 00:04:12.908: Vi4 PPP: Treating connection as a callin 
Jan  1 00:04:12.912: Vi4 PPP: Phase is ESTABLISHING, Passive Open 
Jan  1 00:04:12.912: Vi4 LCP: State is Listen 
Jan  1 00:04:12.920: Vi4 LCP: I FORCED CONFREQ len 11 
Jan  1 00:04:12.924: Vi4 LCP:    AuthProto CHAP (0x0305C22305) 
Jan  1 00:04:12.924: Vi4 LCP:    MagicNumber 0x109D08F2 (0x0506109D08F2) 
Jan  1 00:04:12.928: Vi4 VPDN: PPP LCP accepted rcv CONFACK 
Jan  1 00:04:12.928: Vi4 VPDN: PPP LCP accepted sent CONFACK 
Jan  1 00:04:12.928: Vi4 PPP: Phase is AUTHENTICATING, by this end 
Jan  1 00:04:12.932: Vi4 CHAP: O CHALLENGE id 3 len 27 from "1600-3" 
Jan  1 00:04:12.940: Vi4 CHAP: I RESPONSE id 6 len 27 from "2500-1" 
Jan  1 00:04:12.967: RADIUS: Initial Transmit Virtual-Access4 id 48 
10.51.6.3:1645, Access-Request, len 97 
Jan  1 00:04:12.971:         Attribute 4 6 0A330652 
Jan  1 00:04:12.975:         Attribute 5 6 00000004 
Jan  1 00:04:12.975:         Attribute 61 6 00000005 
Jan  1 00:04:12.975:         Attribute 1 8 32353030 
Jan  1 00:04:12.979:         Attribute 30 8 36313436 
Jan  1 00:04:12.979:         Attribute 31 12 32303835 
Jan  1 00:04:12.979:         Attribute 3 19 06CA1CC2 
Jan  1 00:04:12.983:         Attribute 6 6 00000002 
Jan  1 00:04:12.983:         Attribute 7 6 00000001 
Jan  1 00:04:12.987: RADIUS: Received from id 48 10.51.6.3:1645, 
Access-Accept, len 38 
Jan  1 00:04:12.991:         Attribute 6 6 00000002 
Jan  1 00:04:12.991:         Attribute 7 6 00000001 
Jan  1 00:04:12.991:         Attribute 8 6 FFFFFFFF 
Jan  1 00:04:12.999: AAA/AUTHEN (3530581085): status = PASS 
Jan  1 00:04:12.999: Vi4 AAA/AUTHOR/LCP: Authorize LCP 
Jan  1 00:04:13.003: Vi4 AAA/AUTHOR/LCP (1947215169): Port='Virtual-Access4' 
list='vpdn' service=NET 
Jan  1 00:04:13.003: AAA/AUTHOR/LCP: Vi4 (1947215169) user='2500-1' 
Jan  1 00:04:13.007: Vi4 AAA/AUTHOR/LCP (1947215169): send AV service=ppp 
Jan  1 00:04:13.007: Vi4 AAA/AUTHOR/LCP (1947215169): send AV protocol=lcp 
Jan  1 00:04:13.007: Vi4 AAA/AUTHOR/LCP (1947215169): found list "vpdn" 
Jan  1 00:04:13.011: Vi4 AAA/AUTHOR/LCP (1947215169): Method=radius (radius) 
Jan  1 00:04:13.015: Vi4 AAA/AUTHOR (1947215169): 
Post authorization status = PASS_REPL 
Jan  1 00:04:13.015: Vi4 AAA/AUTHOR/LCP: Processing AV service=ppp 
Jan  1 00:04:13.019: Vi4 CHAP: O SUCCESS id 6 len 4 
Jan  1 00:04:13.023: Vi4 PPP: Phase is UP 
Jan  1 00:04:13.027: Vi4 AAA/AUTHOR/FSM: (0): Can we start IPCP? 
Jan  1 00:04:13.027: Vi4 AAA/AUTHOR/FSM (536495163): Port='Virtual-Access4' 
list='vpdn' service=NET 
Jan  1 00:04:13.031: AAA/AUTHOR/FSM: Vi4 (536495163) user='2500-1' 
Jan  1 00:04:13.031: Vi4 AAA/AUTHOR/FSM (536495163): send AV service=ppp 
Jan  1 00:04:13.035: Vi4 AAA/AUTHOR/FSM (536495163): send AV protocol=ip 
Jan  1 00:04:13.035: Vi4 AAA/AUTHOR/FSM (536495163): found list "vpdn" 
Jan  1 00:04:13.039: Vi4 AAA/AUTHOR/FSM (536495163): Method=radius (radius) 
Jan  1 00:04:13.039: RADIUS: allowing negotiated framed address 
Jan  1 00:04:13.043: Vi4 AAA/AUTHOR (536495163): 
Post authorization status = PASS_REPL 
Jan  1 00:04:13.043: Vi4 AAA/AUTHOR/FSM: We can start IPCP 
Jan  1 00:04:13.047: Vi4 IPCP: O CONFREQ [Closed] id 1 len 10 
Jan  1 00:04:13.051: Vi4 IPCP:    Address 10.51.6.82 (0x03060A330652) 
Jan  1 00:04:13.102: Vi4 IPCP: I CONFREQ [REQsent] id 187 len 16 
Jan  1 00:04:13.114: Vi4 IPCP:    CompressType VJ 15 slots (0x0206002D0F00) 
Jan  1 00:04:13.118: Vi4 IPCP:    Address 10.10.53.2 (0x03060A0A3502) 
Jan  1 00:04:13.118: Vi4 AAA/AUTHOR/IPCP: Start.  Her address 10.10.53.2, 
we want 0.0.0.0 
Jan  1 00:04:13.122: Vi4 AAA/AUTHOR/IPCP (2669954081): Port='Virtual-Access4' 
list='vpdn' service=NET 
Jan  1 00:04:13.126: AAA/AUTHOR/IPCP: Vi4 (2669954081) user='2500-1' 
Jan  1 00:04:13.126: Vi4 AAA/AUTHOR/IPCP (2669954081): send AV service=ppp 
Jan  1 00:04:13.130: Vi4 AAA/AUTHOR/IPCP (2669954081): send AV protocol=ip 
Jan  1 00:04:13.130: Vi4 AAA/AUTHOR/IPCP (2669954081): send AV addr*10.10.53.2 
Jan  1 00:04:13.134: Vi4 AAA/AUTHOR/IPCP (2669954081): found list "vpdn" 
Jan  1 00:04:13.134: Vi4 AAA/AUTHOR/IPCP (2669954081): Method=radius (radius) 
Jan  1 00:04:13.138: RADIUS: allowing negotiated framed address 10.10.53.2 
Jan  1 00:04:13.142: Vi4 AAA/AUTHOR (2669954081): 
Post authorization status = PASS_REPL 
Jan  1 00:04:13.146: Vi4 AAA/AUTHOR/IPCP: Processing AV service=ppp 
Jan  1 00:04:13.146: Vi4 AAA/AUTHOR/IPCP: Processing AV addr=10.10.53.2 
Jan  1 00:04:13.150: Vi4 AAA/AUTHOR/IPCP: Authorization succeeded 
Jan  1 00:04:13.150: Vi4 AAA/AUTHOR/IPCP: Done.  Her address 10.10.53.2, 
we want 10.10.53.2 
Jan  1 00:04:13.154: Vi4 IPCP: O CONFREJ [REQsent] id 187 len 10 
Jan  1 00:04:13.154: Vi4 IPCP:    CompressType VJ 15 slots (0x0206002D0F00) 
Jan  1 00:04:13.162: Vi4 IPCP: I CONFACK [REQsent] id 1 len 10 
Jan  1 00:04:13.162: Vi4 IPCP:    Address 10.51.6.82 (0x03060A330652) 
Jan  1 00:04:13.213: Vi4 IPCP: I CONFREQ [ACKrcvd] id 188 len 10 
Jan  1 00:04:13.217: Vi4 IPCP:    Address 10.10.53.2 (0x03060A0A3502) 
Jan  1 00:04:13.217: Vi4 AAA/AUTHOR/IPCP: Start.  Her address 10.10.53.2, 
we want 10.10.53.2 
Jan  1 00:04:13.221: Vi4 AAA/AUTHOR/IPCP: Processing AV service=ppp 
Jan  1 00:04:13.221: Vi4 AAA/AUTHOR/IPCP: Processing AV addr=10.10.53.2 
Jan  1 00:04:13.225: Vi4 AAA/AUTHOR/IPCP: Authorization succeeded 
Jan  1 00:04:13.225: Vi4 AAA/AUTHOR/IPCP: Done.  Her address 10.10.53.2, 
we want 10.10.53.2 
Jan  1 00:04:13.229: Vi4 IPCP: O CONFACK [ACKrcvd] id 188 len 10 
Jan  1 00:04:13.233: Vi4 IPCP:    Address 10.10.53.2 (0x03060A0A3502) 
Jan  1 00:04:13.233: Vi4 IPCP: State is Open 
Jan  1 00:04:13.261: Vi4 IPCP: Install route to 10.10.53.2 
Jan  1 00:04:14.015: %LINEPROTO-5-UPDOWN: Line protocol on 
Interface Virtual-Access4, changed state to up 

PPP/L2TP 断开连接顺序

  1. 远程用户丢弃 ISDN 链路以丢弃对 LAC 的呼叫。

  2. LAC PPP 状态机终止,LCP 状态为 Closed。

  3. 为了通知会话的断开的LNS, LAC发送Call-Disconnect-Notify (CDN)并且毁坏会话。CDN 包含一个 AVP 1 结果代码,显示断开连接的原因为“Loss of carrier”。会话此时处于 IDLE 状态。

  4. LNS 发送一个 ZLB 消息(顺序确认)并破坏会话。会话此时处于 IDLE 状态。

  5. LNS 关闭本地 PPP 接口。虚拟访问接口的状态变为 Down:

    • 关闭 IPCP,关闭 LCP,将 PPP 状态机声明为 Down。

    • 从 LNS 路由表中删除指向远程用户的主机路由。

    • 此时在 LAC 和 LNS 上,隧道状态都是 No-Sessions-Left。

  6. 由于这是隧道内的最后一个会话,因此可以关闭控制连接了。对于 LNS,隧道关闭的默认计时器为 10 秒,对于 LAC 则为 15 秒。

  7. LNS 向 LAC 发送一个 Stop-Control-Connection-Notification (Stop-CCN),以关闭控制连接和隧道。Stop-CCN 包含隧道关闭的原因“Request to clear control connection”。隧道此时处于 IDLE 状态。

  8. LAC 向 LNS 发送一个 ZLB 消息(顺序确认)。隧道此时处于 IDLE 状态。

  9. 此时隧道已关闭。

注意: LAC 和 LNS 都可启动会话和控制连接卸除。不必清除隧道内的会话即可关闭隧道。

/image/gif/paws/23980/l2tp_23980b.gif

显示 PPP 和 L2TP 断开连接的 LAC 调试结果

Jan  1 00:04:27.375: %ISDN-6-DISCONNECT: Interface Serial0:0  
disconnected from 2085730592 2500-1, call lasted 17 seconds 
Jan  1 00:04:27.387: %LINK-3-UPDOWN: 
Interface Serial0:0, changed state to down 
Jan  1 00:04:27.387: Se0:0 PPP: Phase is TERMINATING [0 sess, 0 load] 
Jan  1 00:04:27.387: Se0:0 LCP: State is Closed 
Jan  1 00:04:27.387: Se0:0 PPP: Phase is DOWN [0 sess, 0 load] 
Jan  1 00:04:27.387: Se0:0 VPDN: Cleanup 
Jan  1 00:04:27.387: Se0:0 VPDN: Reset 
Jan  1 00:04:27.387: Se0:0 Tnl/Cl 17688/7 L2TP: O CDN to l2tp-gw 55270/45 
Jan  1 00:04:27.387: Se0:0 Tnl/Cl 17688/7 L2TP: O CDN, 
flg TLS, ver 2, len 38, tnl 55270, cl 45, ns 4, nr 2 
         C8 02 00 26 D7 E6 00 2D 00 04 00 02 80 08 00 00 
         00 00 00 0E 80 08 00 00 00 0E 00 07 80 0A 00 00 
         00 01 00 01 00 00 
Jan  1 00:04:27.387: Se0:0 Tnl/Cl 17688/7 L2TP: 
Destroying session 
Jan  1 00:04:27.387: Se0:0 Tnl/Cl 17688/7 L2TP: Session state change 
from established to idle 
Jan  1 00:04:27.387: Se0:0 Tnl/Cl 17688/7 L2TP: VPDN: 
Releasing idb for LAC/LNS tunnel 17688/55270 session 7 state idle 
Jan  1 00:04:27.387: Tnl 17688 L2TP: Tunnel state change from established 
to no-sessions-left 
Jan  1 00:04:27.387: Tnl 17688 L2TP: No more sessions in tunnel, 
shutdown (likely) in 15 seconds 
Jan  1 00:04:27.431: Tnl 17688 L2TP: I ZLB ctrl ack, flg TLS, ver 2, 
len 12, tnl 17688, cl 0, ns 2, nr 5 
Jan  1 00:04:28.387: %LINEPROTO-5-UPDOWN: 
Line protocol on Interface Serial0:0, changed state to down 
Jan  1 00:04:37.383: Tnl 17688 L2TP: Parse  AVP 0, len 8, flag 0x8000 (M) 
Jan  1 00:04:37.383: Tnl 17688 L2TP: Parse StopCCN 
Jan  1 00:04:37.383: Tnl 17688 L2TP: Parse  AVP 9, len 8, flag 0x8000 (M) 
Jan  1 00:04:37.383: Tnl 17688 L2TP: Assigned Tunnel ID 55270 
Jan  1 00:04:37.383: Tnl 17688 L2TP: Parse  AVP 1, len 8, flag 0x8000 (M) 
Jan  1 00:04:37.387: L2X: Result code(1): 1: 
Request to clear control connection 
Jan  1 00:04:37.387:      Error code(0): No error 
Jan  1 00:04:37.387: Tnl 17688 L2TP: No missing AVPs in StopCCN 
Jan  1 00:04:37.387: Tnl 17688 L2TP: I StopCCN, flg TLS, ver 2, 
len 36, tnl 17688, cl 0, ns 2, nr 5 
         C8 02 00 24 45 18 00 00 00 02 00 05 80 08 00 00 
         00 00 00 04 80 08 00 00 00 09 D7 E6 80 08 00 00 
         00 01 00 01 
Jan  1 00:04:37.387: Tnl 17688 L2TP: O ZLB ctrl ack, flg TLS, ver 2, 
len 12, tnl 55270, cl 0, ns 5, nr 3 
         C8 02 00 0C D7 E6 00 00 00 05 00 03 
Jan  1 00:04:37.387: Tnl 17688 L2TP: I StopCCN from l2tp-gw tnl 55270 
Jan  1 00:04:37.387: Tnl 17688 L2TP: Shutdown tunnel 
Jan  1 00:04:37.387: Tnl 17688 L2TP: Tunnel state change from no-sessions-left 
to idle 

显示 PPP 和 L2TP 断开连接的 LNS 调试结果

Jan  1 00:04:27.740: Vi4 Tnl/Cl 55270/45 L2TP: 
Parse  AVP 0, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:27.740: Vi4 Tnl/Cl 55270/45 L2TP: Parse CDN 
Jan  1 00:04:27.744: Vi4 Tnl/Cl 55270/45 L2TP: 
Parse  AVP 14, len 8, flag 0x0x8000 (M) 
Jan  1 00:04:27.748: Vi4 Tnl/Cl 55270/45 L2TP: Assigned Call ID 7 
Jan  1 00:04:27.752: Vi4 Tnl/Cl 55270/45 L2TP: 
Parse  AVP 1, len 10, flag 0x0x8000 (M) 
Jan  1 00:04:27.752: Vi4 Tnl/Cl 55270/45 L2TP: 
Result code(1): 1: Loss of carrier 
Jan  1 00:04:27.756:      Error code(0): No error 
Jan  1 00:04:27.756: Vi4 Tnl/Cl 55270/45 L2TP: 
No missing AVPs in CDN 
Jan  1 00:04:27.760: Vi4 Tnl/Cl 55270/45 L2TP: I CDN, flg TLS, ver 2, 
len 38, tnl 55270, cl 45, ns 4, nr 2 contiguous pak, size 38 
         C8 02 00 26 D7 E6 00 2D 00 04 00 02 80 08 00 00 
         00 00 00 0E 80 08 00 00 00 0E 00 07 80 0A 00 00 
         00 01 00 01 00 00 
Jan  1 00:04:27.772: Vi4 Tnl/Cl 55270/45 L2TP: O ZLB ctrl ack, flg TLS, 
ver 2, len 12, tnl 17688, cl 0, ns 2, nr 5 
Jan  1 00:04:27.776: contiguous buffer, size 12 
         C8 02 00 0C 45 18 00 00 00 02 00 05 
Jan  1 00:04:27.780: Vi4 Tnl/Cl 55270/45 L2TP: I CDN from hgw tnl 17688, cl 7 
Jan  1 00:04:27.780: Vi4 Tnl/Cl 55270/45 L2TP: Destroying session 
Jan  1 00:04:27.784: Vi4 Tnl/Cl 55270/45 L2TP: 
Session state change from established to idle 
Jan  1 00:04:27.788: Vi4 Tnl/Cl 55270/45 L2TP: 
VPDN: Releasing idb for LAC/LNS tunnel 55270/17688 session 45 state idle 
Jan  1 00:04:27.792: Vi4 VPDN: Reset 
Jan  1 00:04:27.792: Tnl 55270 L2TP: 
Tunnel state change from established to no-sessions-left 
Jan  1 00:04:27.796: Tnl 55270 L2TP: 
No more sessions in tunnel, shutdown (likely) in 10 seconds 
Jan  1 00:04:27.800: %LINK-3-UPDOWN: Interface Virtual-Access4, 
changed state to down 
Jan  1 00:04:27.816: Vi4 IPCP: State is Closed 
Jan  1 00:04:27.820: Vi4 PPP: Phase is TERMINATING 
Jan  1 00:04:27.820: Vi4 LCP: State is Closed 
Jan  1 00:04:27.824: Vi4 PPP: Phase is DOWN 
Jan  1 00:04:27.839: Vi4 IPCP: Remove route to 10.10.53.2 
Jan  1 00:04:29.022: %LINEPROTO-5-UPDOWN: 
Line protocol on Interface Virtual-Access4, changed state to down 
Jan  1 00:04:37.720: Tnl 55270 L2TP: O StopCCN  to hgw tnlid 17688 
Jan  1 00:04:37.724: Tnl 55270 L2TP: O StopCCN, flg TLS, ver 2, 
len 36, tnl 17688, cl 0, ns 2, nr 5 
Jan  1 00:04:37.728: contiguous buffer, size 36 
         C8 02 00 24 45 18 00 00 00 02 00 05 80 08 00 00 
         00 00 00 04 80 08 00 00 00 09 D7 E6 80 08 00 00 
         00 01 00 01 
Jan  1 00:04:37.736: Tnl 55270 L2TP: 
Tunnel state change from no-sessions-left to shutting-down 
Jan  1 00:04:37.740: Tnl 55270 L2TP: Shutdown tunnel 
Jan  1 00:04:37.744: Tnl 55270 L2TP: 
Tunnel state change from shutting-down to idle 

相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


相关信息


Document ID: 23980