示例:配置静态 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 捆绑包。
拓扑结构
终止的 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-renegotiationuser@host#set l2tp maximum-sessions-per-tunnel 2000user@host#set l2tp shared-secret passwordset 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语句,在层次结构级别指定 L2TP AAA 访问配置文件。[edit access][edit services]使用层次结构级别定义[edit access]的 L2TP AAA 访问配置文件将覆盖为tunnel-group使用[edit services]层次结构级别定义的 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.1set 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。
创建静态 (
si) 接口 MLPPP 捆绑包 IFLsi-5/0/0,单位为 100。[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 1500user@host#set fragment-threshold 640set 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 信息
目的
验证 MLPPP over LNS 用户的捆绑 IFL 信息是否正确。
行动
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 协议进行配置。
验证订阅者信息
目的
验证基于 LNS 的静态 MLPPP 的用户信息是否正确。
行动
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 的用户信息。