示例:配置静态 LNS MLPPP 订阅者
此示例说明如何配置静态 L2TP 网络服务器 (LNS) 多链路 (MLPPP) 订阅者。
要求
此示例使用以下硬件和软件组件:
安装了 MPC2 的 MX 系列
Junos OS 13.3 或更高版本
在配置静态 L2TP 网络服务器 (LNS) 多链路 (MLPPP) 订阅者之前,请确保您已:
为 LNS 订阅者启用了内联服务 (
si
) 接口。请参阅 为 PPPoE 和 LNS 订阅者启用内联服务接口。为 LNS 订阅者配置了内联服务 (
si
) 接口。请参阅 为 PPPoE 和 LNS 订阅者配置内联服务接口。
概述
一个 MLPPP 订阅者由两个 IFL(逻辑接口)、一个成员链路和一个捆绑包组成。对于静态 MLPPP 订阅者,您可以静态配置成员链路和捆绑包。对于静态 LNS MLPPP 订阅者,您可以手动配置成员链路和捆绑 IFL。使用该 family mlppp
设置配置订阅者接口后,在成员链路 IFL 可以为 LNS 启动 LCP(链路控制协议)协商之前,还必须完全配置成员链路的捆绑 IFL。 图 1 显示了不同类型的流量如何遍历 MX 系列设备充当 LNS 以终止 MLPPP 捆绑包的网络。
拓扑学

显示了以下三个域通过 LNS 网络传递流量:
PPP 域 — 包含数据和语音流量
MLPPP 域 — 仅包含数据流量
L2TP 域 - 包含所有类型的流量
配置
要配置静态 L2TP 网络服务器 (LNS) 多链路 (MLPPP) 订阅者,请执行以下任务:
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit]
级的 CLI 中。
[edit] set access profile ce-l2tp-profile1 client ce-lac-1 user-group-profile ce-lac-1-gp set access profile ce-l2tp-profile1 client ce-lac-1 l2tp lcp-renegotiation set access profile ce-l2tp-profile1 client ce-lac-1 l2tp maximum-sessions-per-tunnel 2000 set access profile ce-l2tp-profile1 client ce-lac-1 l2tp shared-secret “password” set access profile ce-l2tp-profile1 client ce-lac-1 l2tp multilink set services l2tp tunnel-group lns1 l2tp-access-profile ce-l2tp-profile1 set services l2tp tunnel-group lns1 aaa-access-profile ce-authenticator set services l2tp tunnel-group lns1 local-gateway address 10.1.1.2 set services l2tp tunnel-group lns1 service-interface si-1/0/0 [edit] set interfaces si-1/0/0.1 set interfaces si-1/0/0.1 dial-options l2tp-interface-id not used dedicated set interfaces si-1/0/0.1 family mlppp bundle si-5/1/0.100 set interfaces si-1/0/0.1 family inet unnumbered-address lo0.0 set interfaces si-1/0/0.2 set interfaces si-1/0/0.2 dial-options l2tp-interface-id not used dedicated set interfaces si-1/0/0.2 family mlppp bundle si-5/1/0.101 set interfaces si-1/0/0.2 family inet [edit] set interfaces si-5/0/0 unit 100 set interfaces si-5/0/0 unit 100 encapsulation multilink-ppp set interfaces si-5/0/0 unit 100 mrru 1500 set interfaces si-5/0/0 unit 100 fragment-threshold 640 set interfaces si-5/0/0 unit 100 short-sequence set interfaces si-5/0/0 unit 100 ppp-options dynamic-profile l2l3-service-prof
使用内联服务接口和 L2TP 访问配置文件属性配置隧道组
分步过程
下面的示例要求您在各个配置层级中进行导航。
要为静态 LNS MLPPP 用户配置具有内联服务接口 (si
) 和 L2TP 访问配置文件属性的隧道组:
创建访问配置文件。
[edit access]
user@host#set profile ce-l2tp-profile1
配置 L2TP (LAC) 接入客户端。
[edit access profile ce-l2tp-profile1]
user@host#set client ce-lac-1
关联包含 PPP 属性的组配置文件,以应用于从此 LAC 客户端通过隧道传输的 PPP 会话。
[edit access profile ce-l2tp-profile1 client ce-lac1ce-lac1]
user@host#set user-group-profile ce-lac-1-gp
为此示例配置以下 L2TP 访问配置文件属性:
与 PPP 客户端的链路控制协议 (LCP)。
来自客户端的隧道 (LAC) 隧道中允许的最大会话数。
用于验证客户端 (LAC) 的隧道密码。
对于静态订阅者,L2TP 客户端支持 MLPPP。该
multilink
语句确定来自 LAC 对等方的订阅者是否支持 MLPPP。
[edit access profile ce-l2tp-profile1 client ce-lac1ce-lac1]
user@host#
user@host#set l2tp lcp-renegotiation
user@host#set l2tp maximum-sessions-per-tunnel 2000
user@host#set l2tp shared-secret password
set l2tp multilink
注意:请勿在静态 LNS MLPPP 订阅者的 L2TP 访问客户端配置文件中指定动态配置文件名称。
创建隧道组。
[edit services l2tp]
user@host#set tunnel-group lns1
将隧道访问配置文件设置为您为访问配置文件定义的设置。
[edit services l2tp tunnel-group lns1]
user@host#set l2tp-access-profile ce-l2tp-profile1
设置 L2TP AAA 访问配置文件。
注意:您可以分别使用 LNS 访问客户端配置文件或
tunnel-group
语句在[edit access]
或[edit services]
层级指定 L2TP AAA 访问配置文件。使用[edit access]
层次结构级别定义的 L2TP AAA 访问配置文件将覆盖为使用[edit services]
层次结构级别定义的tunnel-group
L2TP AAA 访问配置文件。[edit services l2tp tunnel-group lns1]
user@host#set aaa-access-profile ce-authenticator
设置 L2TP 隧道的本地网关地址。
[edit services l2tp tunnel-group lns1]
user@host#set local-gateway address 10.1.1.2
为静态 LNS MLPPP 订阅者指定内联服务接口 (
si
)。[edit services l2tp tunnel-group lns1]
user@host#set service-interface si-1/0/0
如果完成设备配置,请提交配置。
[edit] user@host# commit
配置静态 LNS 成员链路 IFL
分步过程
下面的示例要求您在各个配置层级中进行导航。
要配置静态 LNS 成员链路 IFL,请使用语 family mlppp
句指定静态捆绑包。
您还必须在订阅者 (si
) 接口中配置family inet
语句。该family inet
设置允许安装 L2TP 长路由,并支持查找引擎将控制数据包引导至路由引擎;如果需要,还可以启用混合模式支持。
以下示例显示 PPP 和 MLPPP 订阅者都可以使用接口 si-1/0/0.1
成功登录,而只有 MLPPP 订阅者可以使用接口 si-1/0/0.2
成功登录。
si-1/0/0.1
创建和si-1/0/0.2
接口。[edit interfaces]
user@host#
user@host#set si-1/0/0.1
set si-1/0/0.2
si-1/0/0.1
对于接口,设置 L2TP 拨号选项,以指定逻辑接口一次可托管一个会话(专用)。[edit interfaces si-1/0/0.1]
user@host#set dial-options l2tp-interface-id not used dedicated
启用 MLPPP 支持并配置静态捆绑包内联接口 (IFL)。
[edit interfaces si-1/0/0.1]
user@host#set family mlppp bundle si-5/1/0.100
启用 LNS 支持和混合模式支持。
[edit interfaces si-1/0/0.1]
user@host#set family inet unnumbered-address lo0.0
si-1/0/0.2
对于接口,设置 L2TP 拨号选项,以指定逻辑接口一次可托管一个会话(专用)。[edit interfaces si-1/0/0.2]
user@host#set dial-options l2tp-interface-id not used dedicated
启用 MLPPP 支持并配置静态捆绑包内联接口 (IFL)。
[edit interfaces si-1/0/0.2]
user@host#set family mlppp bundle si-5/1/0.101
启用 LNS 长路由支持。
[edit interfaces si-1/0/0.2]
user@host#set family inet
如果完成设备配置,请提交配置。
[edit] user@host# commit
配置静态内联服务 MLPPP 捆绑包 IFL
分步过程
下面的示例要求您在各个配置层级中进行导航。
要配置静态内联服务 (si
) 接口 MLPPP 捆绑包 IFL,请在接口中si
指定encapsulation multilink-ppp
语句。si
接口锚定捆绑接口。
您还可以设置以下可选 MLPPP 参数:MRRU、短序列和片段阈值。以下示例说明如何配置静态 (si
) 接口 MLPPP 捆绑包 IFL。
创建单元为 100 的静态 (
si
) 接口 MLPPP 捆绑包 IFLsi-5/0/0
。[edit interfaces]
user@host#set si-5/0/0 unit 100
配置
encapsulation multilink-ppp
语句为接口启用 MLPPP 捆绑si-5/0/0.100
。[edit interfaces si-5/0/0.100]
user@host#set encapsulation multilink-ppp
为此示例配置以下 MLPPP 选项:
mrru
- 指定 1500 到 4500 字节的最大接收重构单位值。fragment-threshold
- 适用于所有数据包和转发类,范围为 128 到 16,320 字节。short-sequence
- 确定 MLPPP 的报头格式。默认值为long-sequence
。
[edit interfaces si-5/0/0.100]
user@host#
user@host#set mrru 1500
user@host#set fragment-threshold 640
set short-sequence
通过配置
ppp-options dynamic profile
设置启用对静态 (si
) 接口 IFL 动态服务的支持。[edit interfaces si-5/0/0.100]
user@host#set ppp-options dynamic-profile l2l3-service-prof
如果完成设备配置,请提交配置。
[edit] user@host# commit
结果
在配置模式下,输入show access
show services
、和show interfaces
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@host# show access profile ce-l2tp-profile1 access profile { ce-l2tp-profile1 { client ce-lac-1 { user-group-profile ce-lac-1-gp; l2tp { interface-id not-used; lcp-renegotiation; maximum-sessions-per-tunnel 2000; shared-secret "$9$2wgUHQF/9pB"; multilink; } } } }
user@host# show services l2tp tunnel-group lns1 services l2tp { tunnel-group lns1 { l2tp-access-profile ce-l2tp-profile1; aaa-access-profile ce-authenticator; local-gateway { address 10.1.1.2; } service-interface si-1/0/0; } }
user@host# show interfaces si-1/0/0 interfaces { si-1/0/0 { unit 1 { dial-options { l2tp-interface-id not-used; dedicated; } family mlppp { bundle si-5/1/0.100; } family inet { unnumbered-address lo0.0; } } unit 2 { dial-options { l2tp-interface-id not-used; dedicated; } family mlppp { bundle si-5/1/0.101; } family inet; } } }
user@host# show interfaces si-5/1/0 interfaces { si-5/1/0 { unit 100 { encapsulation multilink-ppp; mrru 1500; fragment-threshold 640; short-sequence; ppp-options { dynamic-profile l2l3-service-prof; } } } }
验证
确认配置工作正常。
验证内联服务接口信息
目的
验证是否配置了内联服务 (si
) 接口。
行动
user@host> show interfaces si-1/0/0 extensive
Physical interface: si-1/0/0, Enabled, Physical link is Up
Interface index: 143, SNMP ifIndex: 569, Generation: 146
Type: Adaptive-Services, Link-level type: Adaptive-Services, MTU: 9192,
Clocking: Unspecified, Speed: 10000mbps
Device flags : Present Running
Interface flags: Point-To-Point SNMP-Traps Internal: 0x4000
Link type : Full-Duplex
Link flags : None
Physical info : Unspecified
Hold-times : Up 0 ms, Down 0 ms
Current address: Unspecified, Hardware address: Unspecified
Alternate link address: Unspecified
Last flapped : Never
Statistics last cleared: Never
Traffic statistics:
Input bytes : 6068 0 bps
Output bytes : 1072104 352 bps
Input packets: 126 0 pps
Output packets: 12185 0 pps
IPv6 transit statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Input errors
Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Giants: 0,
Policed discards: 0, Resource errors: 0
Output errors:
Carrier transitions: 0, Errors: 0, Drops: 0, MTU errors: 0,
Resource errors: 0
意义
启用 (si
) 接口时,其物理链路已启动并运行,并设置了点对点接口标志。它在 LNS 订阅者、LNS MLPPP 成员链路和 MX 系列 MLPPP 捆绑包之间共享。
验证捆绑包 IFL 信息
目的
验证捆绑包 IFL 信息对于基于 LNS 的 MLPPP 订阅者是否正确。
行动
user@host> show interfaces si-5/1/0.1073756926 extensive
Logical interface si-5/1/0.1073756926 (Index 102) (SNMP ifIndex 607)
(Generation 167)
Flags: Up Point-To-Point SNMP-Traps 0x84000 Encapsulation: Multilink-PPP
Last flapped: 2011-04-08 14:13:21 PDT (00:41:48 ago)
Bandwidth: 10000mbps
Bundle links information:
Active bundle links 1
Removed bundle links 0
Disabled bundle links 0
Bundle options:
MRRU 1504
Remote MRRU 1504
Drop timer period 0
Inner PPP Protocol field compression disabled
Sequence number format long (24 bits)
Fragmentation threshold 500
Links needed to sustain bundle 1
Interleave fragments Enabled
Multilink classes 0
Link layer overhead 4.0 %
Bundle status:
Received sequence number 0xffffff
Transmit sequence number 0xffffff
Packet drops 0 (0 bytes)
Fragment drops 0 (0 bytes)
MRRU exceeded 0
Fragment timeout 0
Missing sequence number 0
Out-of-order sequence number 0
Out-of-range sequence number 0
Packet data buffer overflow 0
Fragment data buffer overflow 0
Statistics Frames fps Bytes bps
Bundle:
Multilink:
Input : 3 0 270 0
Output: 3 0 285 0
Network:
Input : 3 0 252 0
Output: 3 0 276 0
IPV6 Transit Statistics Packets Bytes
Network:
Input : 0 0
Output: 0 0
Link:
si-1/0/0.1073756925
Up time: 00:06:37
Input : 126 0 9596 0
Output: 126 0 1226 0
Multilink detail statistics:
Bundle:
Fragments:
Input : 0 0 0 0
Output: 0 0 0 0
Non-fragments:
Input : 0 0 0 0
Output: 0 0 0 0
LFI:
Input : 0 0 0 0
Output: 0 0 0 0
NCP state: inet: Opened, inet6: Not-configured, iso: Not-configured, mpls: Not-configured
Protocol inet, MTU: 1500, Generation: 154, Route table: 0
Flags: Sendbcast-pkt-to-re
Addresses, Flags: Is-Primary
Destination: Unspecified, Local: 80.80.80.1, Broadcast: Unspecified, Generation: 150
意义
由于实现的特殊性,与捆绑包关联的以下错误计数始终显示 0:数据包丢弃(字节)、分段丢弃(字节)、分段超时、缺少序列号、乱序序列号、超出范围的序列号、数据包数据缓冲区溢出和分段数据缓冲区溢出以及超出 MRRU。
验证成员链接 IFL 信息
目的
验证成员链路 IFL 信息对于订阅者是否正确。
行动
user@host> show interfaces si-1/0/0.1073756925 extensive
Logical interface si-5/1/0.1073756925 (Index 80) (SNMP ifIndex 3286)
Flags: Up Point-To-Point SNMP-Traps 0x4000 Encapsulation: Adaptive-Services
Last flapped: 2011-04-08 14:13:21 PDT (00:41:48 ago)
Traffic statistics:
Input bytes : 228
Output bytes : 0
Input packets: 3
Output packets: 0
Local statistics:
Input bytes : 228
Output bytes : 0
Input packets: 3
Output packets: 0
Transit statistics:
Input bytes : 0 0 bps
Output bytes : 0 0 bps
Input packets: 0 0 pps
Output packets: 0 0 pps
Protocol mlppp, Multilink bundle: si-5/1/0.1073756926
Service interface: si-1/0/0, Dynamic profile: ml-bundle-prof
MTU: 9188, Generation: 15538, Route table: 0
意义
多链路捆绑包 si-5/1/0.1073756926
已使用系列 mlppp
协议进行配置。
验证订阅者信息
目的
验证静态 MLPPP over LNS 的订阅者信息是否正确。
行动
user@host> show subscribers extensive
Type: L2TP
User Name: user@test.com
IP Address: 10.80.80.10
IP Netmask: 255.255.255.0
Logical System: default
Routing Instance: default
Interface: si-1/0/0.1
Interface type: Static
State: Active
Radius Accounting ID: 1
Session ID: 1
Bundle Session ID: 2
Login Time: 2011-04-11 07:55:59 PDT
Type: MLPPP
User Name: user@test.com
IP Address: 10.80.80.10
IP Netmask: 255.255.255.0
Logical System: default
Routing Instance: default
Interface: si-5/1/0.100
Interface type: Static
State: Active
Radius Accounting ID: 2
Session ID: 2
Underlying Session ID: 1
Login Time: 2011-04-11 07:55:59 PDT
意义
已为 MLPPP 配置接口的用户信息 si-5/1/0.100
,接口类型为静态。