示例:配置动态 LNS MLPPP 订阅者
此示例说明了如何配置动态 L2TP 网络服务器 (LNS) 多链路 (MLPPP) 订阅者。
要求
此示例使用以下硬件和软件组件:
安装了 MPC2 的 MX 系列
Junos OS 13.3 或更高版本
配置动态 LNS MLPPP 订阅者之前,请确保您已:
如果使用内联服务 (
si) 接口配置隧道组,请为 LNS 用户启用内联服务 (si) 接口。请参阅 为 PPPoE 和 LNS 订阅者启用内联服务接口。为 LNS 订阅者配置了内联服务 (
si) 接口。请参阅 为 PPPoE 和 LNS 订阅者配置内联服务接口。如果使用服务接口池配置隧道组,则为 LNS 订阅者配置服务设备池。请参阅 配置服务设备池以平衡 PPPoE 和 LNS 订阅者负载。
概述
MLPPP 用户由两个 IFL(逻辑接口)、一个成员链路和一个捆绑包组成。对于动态 LNS MLPPP 订阅者,可以使用动态配置文件配置动态成员链路 IFL。成员链路动态配置文件包括 family mlppp 包含捆绑包动态配置文件和服务接口 (si) 或服务接口池的语句。然后,此信息用于创建动态捆绑 IFL。
每个动态捆绑包仅接受一个动态成员链路。如果多个动态成员链路尝试加入同一个动态捆绑包,则系统将使新成员会话失败。
图 1 显示了不同类型的流量如何通过 MX 系列作为 LNS 来终止 MLPPP 捆绑包的网络。
拓扑结构
终止的 MLPPP 束
显示了通过 LNS 网络传递流量的以下三个域:
PPP 域 — 包含数据和语音流量
MLPPP 域 — 仅包含数据流量
L2TP 域 — 包含所有类型的流量
配置
要配置动态 LNS MLPPP 订阅者,请执行以下作:
- CLI 快速配置
- 使用服务接口池和 L2TP 访问配置文件属性配置隧道组
- 为不支持混合模式的动态 LNS 成员链路 IFL 配置动态配置文件
- 为支持混合模式的动态 LNS 成员链路 IFL 配置动态配置文件
- 为动态捆绑 IFL 配置动态配置文件
- 结果
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 [edit] CLI 中。
[edit] set access profile ce-l2tp-profile2 client ce-lac-3 user-group-profile ce-lac-1-gp set access profile ce-l2tp-profile2 client ce-lac-3 l2tp multilink set access profile ce-l2tp-profile2 client ce-lac-3 l2tp maximum-sessions-per-tunnel 2000 set access profile ce-l2tp-profile2 client ce-lac-3 l2tp shared-secret “password” set access profile ce-l2tp-profile2 client ce-lac-3 l2tp dynamic-profile ml-lns-member-prof set services l2tp tunnel-group dyn-l2tp-tunnel-group l2tp-access-profile ce-l2tp-profile2 set services l2tp tunnel-group dyn-l2tp-tunnel-group aaa-access-profile ce-authenticator set services l2tp tunnel-group dyn-l2tp-tunnel-group local-gateway address 10.1.1.1 set services l2tp tunnel-group dyn-l2tp-tunnel-group service-device-pool pool1 set services l2tp tunnel-group dyn-l2tp-tunnel-group dynamic-profile ml-lns-member-prof [edit] set dynamic-profiles mlp-lns-member-profile set dynamic-profiles mlp-lns-member-profile interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” set dynamic-profiles mlp-lns-member-profile interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” dial-options l2tp-interface-id dont care dedicated set dynamic-profiles mlp-lns-member-profile interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” family mlppp bundle “$junos-bundle-interface-name” set dynamic-profiles mlp-lns-member-profile interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” family mlppp service-device-pool pool1 set dynamic-profiles mlp-lns-member-profile interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” family mlppp dynamic-profile ml-bundle-prof set dynamic-profiles mlp-lns-member-profile interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” family inet [edit] set dynamic-profiles ml-bundle-prof set dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" set dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" routing-options access route $junos-framed-route-ip-address-prefix set dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" routing-options access route $junos-framed-route-ip-address-prefix next-hop $junos-framed-route-nexthop set dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" routing-options access route $junos-framed-route-ip-address-prefix metric $junos-framed-route-cost set dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" routing-options access route $junos-framed-route-ip-address-prefix preference $junos-framed-route-distance set dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" access-internal route $junos-subscriber-ip-address set dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" access-internal route $junos-subscriber-ip-address qualified-next-hop $junos-interface-name set dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” set dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” encapsulation multilink-ppp set dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” mrru 1500 set dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” short-sequence set dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” fragment-threshold 320 set dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” family inet set class-of-service traffic-control-profiles tcp2 set dynamic-profiles ml-bundle-prof class-of-service traffic-control-profiles tcp2 scheduler-map "$junos-cos-scheduler-map” set dynamic-profiles ml-bundle-prof class-of-service traffic-control-profiles tcp2 shaping-rate "$junos-cos-shaping-rate" set dynamic-profiles ml-bundle-prof class-of-service traffic-control-profiles tcp2 guaranteed-rate "$junos-cos-guaranteed-rate" set dynamic-profiles ml-bundle-prof class-of-service traffic-control-profiles tcp2 delay-buffer-rate “$junos-cos-delay-buffer-rate” set dynamic-profiles ml-bundle-prof class-of-service interfaces “$junos-interface-ifd-name” unit "$junos-interface-unit" set dynamic-profiles ml-bundle-prof class-of-service interfaces “$junos-interface-ifd-name” unit "$junos-interface-unit" output-traffic-control-profile tcp2 set dynamic-profiles ml-bundle-prof class-of-service interfaces “$junos-interface-ifd-name” unit "$junos-interface-unit" fragmentation-map fragmap-2
使用服务接口池和 L2TP 访问配置文件属性配置隧道组
分步程序
下面的示例要求您在各个配置层级中进行导航。
要为动态 LNS MLPPP 用户配置包含服务接口池和 L2TP 访问配置文件属性的隧道组:
创建访问配置文件。
[edit access]user@host#set profile ce-l2tp-profile2配置 L2TP (LAC) 访问客户端。
[edit access profile ce-l2tp-profile2]user@host#set client ce-lac-3关联包含 PPP 属性的组配置文件,以申请从此 LAC 客户端以隧道传输的 PPP 会话。
[edit access profile ce-l2tp-profile2 client ce-lac-3]user@host#set user-group-profile ce-lac-1-gp为此示例配置以下 L2TP 访问配置文件属性:
L2TP 客户端支持多链路 (MLPPP),适用于订阅者。
multilinkL2TP 访问客户端配置文件中的语句确定从 LAC 对等方进入的用户是否支持 MLPPP。来自客户端 (LAC) 的隧道中允许的最大会话数。
用于验证客户端 (LAC) 的隧道密码。
动态 LNS MLPPP 订阅者的 L2TP 访问客户端配置文件中的动态配置文件名称。
注意:如果在 L2TP 访问客户端配置文件中定义了 ,
dynamic-profile name则用于创建动态 LNS MLPPP 成员链路;否则,将使用在隧道组中定义的 。dynamic-profile name如果两个配置文件均未包含该family mlppp语句,则传入 LNS 会话将失败。
[edit access profile ce-l2tp-profile2 client ce-lac-3]user@host#user@host#set l2tp multilinkuser@host#set l2tp maximum-sessions-per-tunnel 2000user@host#set l2tp shared-secret passwordset dynamic-profile ml-lns-member-prof创建隧道组。
[edit services l2tp]user@host#set tunnel-group dyn-l2tp-tunnel-group将隧道访问配置文件设置为等于您为访问配置文件定义的设置。
[edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host#set l2tp-access-profile ce-l2tp-profile2设置 L2TP AAA 访问配置文件。
注意:您可以分别使用 LNS 访问客户端配置文件或
tunnel-group语句,在 或[edit services]层次结构级别指定[edit access]L2TP AAA 访问配置文件。使用层次结构级别定义[edit access]的 L2TP AAA 访问配置文件将覆盖为tunnel-group使用[edit services]层次结构级别定义的 L2TP AAA 访问配置文件。[edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host#set aaa-access-profile ce-authenticator为 L2TP 隧道设置本地网关地址。
[edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host#set local-gateway address 10.1.1.1为动态 LNS MLPPP 订阅者指定服务接口池。
[edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host#set service-device-pool pool1指定用于创建动态 LNS MLPPP 成员链路的动态配置文件。
[edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host#set dynamic-profile ml-lns-member-prof如果完成设备配置,请提交配置。
[edit] user@host# commit
为不支持混合模式的动态 LNS 成员链路 IFL 配置动态配置文件
分步程序
下面的示例要求您在各个配置层级中进行导航。
您可以在 L2TP 客户端访问配置文件或隧道组中配置用于 dynamic-profile name 创建动态 LNS 成员链路 IFL。请参阅 使用服务接口和 L2TP 访问配置文件属性池配置隧道组。
以下示例显示了 dynamic-profile LNS、MLPPP 和 PPP 用户的配置。该 family mlppp 语句包含 dynamic-profile name用于创建动态捆绑 IFL 的 、 service-interface service-device-pool或 。如果配置 service-device-pool,则会从池中选择一个内联服务 (si) 接口,以便使用轮询方法创建动态捆绑 IFL。
您还必须在成员链路动态配置文件接口中si为隧道订阅者配置该family inet语句。该family inet语句允许安装 L2TP 长路由,并支持查找引擎将控制数据包引导到路由引擎。
或者,您可以将动态配置文件配置为支持混合模式,以便 PPP 订阅者能够使用动态配置文件成功登录。有关所需的其他配置命令,请参阅为支持 混合模式的动态 LNS 成员链路 IFL 配置动态配置文件 。
指定之前在使用 服务接口和 L2TP 访问配置文件属性池配置隧道组中用于创建动态 LNS MLPPP 成员链路的动态配置文件。
[edit dynamic-profiles]user@host#set ml-lns-member-prof通过设置预定义的动态接口变量 $junos-interface-ifd-name来配置动态配置文件的接口,并通过设置预定义的单元号变量 $junos-interface-unit来配置逻辑接口单元。接口和单元号变量将动态替换为连接到 MX 系列时订阅者访问的接口和单元号。
注意:PPPoE 会话的动态配置文件的接口设置可以使用以下任一代码格式:
set interfaces pp0或
set interfaces “$junos-interface-ifd-name”
此示例使用
set interfaces “$junos-interface-ifd-name”.[edit dynamic-profiles ml-lns-member-prof]user@host#set interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”对于 $junos-interface-ifd-name 接口,设置 L2TP 接口拨号选项,以指定逻辑接口一次可托管一个会话(专用)。
[edit dynamic-profiles ml-lns-member-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host#set dial-options l2tp-interface-id dont care dedicated为 LNS MLPPP 订阅者启用 MLPPP 支持,并通过设置预定义的动态捆绑接口变量 $junos-bundle-interface-name来配置动态捆绑接口 (IFL)。
注意:该
family mlppp语句确定从底层接口传入的用户是否支持 MLPPP。[edit dynamic-profiles ml-lns-member-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host#set family mlppp bundle “$junos-bundle-interface-name”为动态 LNS MLPPP 订阅者指定服务接口池。
[edit dynamic-profiles ml-lns-member-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” family mlppp]user@host#set service-device-pool pool1指定捆绑包的动态配置文件名称。
[edit dynamic-profiles ml-lns-member-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” family mlppp]user@host#set dynamic-profile ml-bundle-prof启用对 LNS 订阅者和 LNS 长路由的支持。
[edit dynamic-profiles ml-lns-member-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host#set family inet如果完成设备配置,请提交配置。
[edit] user@host# commit
为支持混合模式的动态 LNS 成员链路 IFL 配置动态配置文件
分步程序
下面的示例要求您在各个配置层级中进行导航。
或者,您可以将动态配置文件配置为支持混合模式,以便 PPP 订阅者能够使用动态配置文件成功登录。
以下示例显示了支持动态配置文件的混合模式所需的附加配置。
CLI 快速配置部分未包含以下配置命令。
指定之前在使用 服务接口和 L2TP 访问配置文件属性池配置隧道组中用于创建动态 LNS MLPPP 成员链路的动态配置文件。
[edit dynamic-profiles]user@host#set ml-lns-member-prof当客户端设备 (CPE) 用于动态虚拟路由和转发 (VRF) PPP 用户时,您必须配置路由实例及其接口。
[edit dynamic-profiles ml-lns-member-prof]user@host#set routing-instances "$junos-routing-instance" interface "$junos-interface-name"为路由选项配置访问路由。
[edit dynamic-profiles ml-lns-member-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name"]user@host#set routing-options access route $junos-framed-route-ip-address-prefix配置路由器的下一跃点、指标和首选项。
[edit dynamic-profiles ml-lns-member-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" routing-options access route $junos-framed-route-ip-address-prefix]user@host#user@host#set next-hop $junos-framed-route-nexthopuser@host#set metric $junos-framed-route-costset preference $junos-framed-route-distance为路由选项配置内部访问路由。
[edit dynamic-profiles ml-lns-member-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name"]user@host#set routing-options access-internal route $junos-subscriber-ip-address为内部路由配置合格下一跃点。
[edit dynamic-profiles ml-lns-member-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" routing-options access-internal route $junos-subscriber-ip-address ]user@host#set qualified-next-hop $junos-interface-name请遵循 为不支持混合模式的动态 LNS 成员链路 IFL 配置动态配置文件 中所述的过程,配置动态配置文件的基本设置。
注意:要启用混合模式支持,当 CPE 是 PPP 用户时,还必须向语句添加
family inet未编号地址以及输入和输出过滤器。[edit dynamic-profiles ml-lns-member-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host#user@host#set family inet unnumbered-address $junos-loopback-interfaceset family inet filter input "$junos-input-filter" output "$junos-output-filter”当 CPE 是 PPP 用户时,还必须配置服务等级并定义流量控制配置文件。
[edit dynamic-profiles ml-lns-member-prof class-of-service]user@host#set traffic-control-profiles tc-profile对于流量控制配置文件,定义以下设置:调度器图、整形速率、开销核算、保证速率和延迟缓冲速率。
[edit dynamic-profiles ml-lns-member-prof class-of-service traffic-control-profiles tc-profile]user@host#user@host#set scheduler-map "$junos-cos-scheduler-map"user@host#set shaping-rate "$junos-cos-shaping-rate"user@host#set overhead-accounting "$junos-cos-shaping-mode" bytes "$junos-cos-byte-adjust"user@host#set guaranteed-rate "$junos-cos-guaranteed-rate"set delay-buffer-rate "$junos-cos-delay-buffer-rate"通过设置预定义的动态接口变量 $junos-interface-ifd-name来配置动态配置文件的接口,并通过设置预定义的单元号变量 $junos-interface-unit来配置逻辑接口单元。
[edit dynamic-profiles ml-lns-member-prof class-of-service]user@host#set interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”对于动态配置文件接口,定义以下设置:输出流量控制配置文件、分类器和重写规则。
[edit dynamic-profiles ml-lns-member-prof class-of-service interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host#user@host#set output-traffic-control-profile tc-profileuser@host#set classifiers dscp GEN-CLASSIFIER-INset rewrite-rules dscp GEN-RW-OUT-DSCP如果完成设备配置,请提交配置。
[edit] user@host# commit
为动态捆绑 IFL 配置动态配置文件
分步程序
下面的示例要求您在各个配置层级中进行导航。
要为动态捆绑 IFL 配置动态配置文件,请在动态配置文件中指定 encapsulation multilink-ppp 语句。 dynamic profile 对于动态捆绑包,IFL 引用自动态 dynamic profile PPPoE 和 LNS 成员链路 IFL。
您必须使用服务等级静态配置该 fragmentation-maps 语句,并在捆绑包动态配置文件中进行分配。您还可以设置以下可选 MLPPP 参数:MRRU、短序列和片段阈值。以下示例说明如何为动态捆绑 IFL 配置动态配置文件。
指定捆绑包的动态配置文件名称。
[edit dynamic-profiles}user@host#set ml-bundle-prof尽管 MLPPP 成员链路会处理身份验证和路由实例分配,但如果分配了非默认路由实例,则必须在分配的路由实例下配置捆绑 IFL。因此,还必须在捆绑包 dynamic-profile 中配置 routing-instances。
[edit dynamic-profiles ml-bundle-prof]user@host#set routing-instances "$junos-routing-instance" interface "$junos-interface-name"为路由选项配置访问路由。
[edit dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name"]user@host#set routing-options access route $junos-framed-route-ip-address-prefix配置路由器的下一跃点、指标和首选项。
[edit dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" routing-options access route $junos-framed-route-ip-address-prefix]user@host#user@host#set next-hop $junos-framed-route-nexthopuser@host#set metric $junos-framed-route-costset preference $junos-framed-route-distance为路由选项配置内部访问路由。
[edit dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name"]user@host#set routing-options access-internal route $junos-subscriber-ip-address为内部路由配置合格下一跃点。
[edit dynamic-profiles ml-bundle-prof routing-instances "$junos-routing-instance" interface "$junos-interface-name" routing-options access-internal route $junos-subscriber-ip-address]user@host#set qualified-next-hop $junos-interface-name通过设置预定义的动态接口变量 $junos-interface-ifd-name来配置动态配置文件的接口,并通过设置预定义的单元号变量 $junos-interface-unit来配置逻辑接口单元。接口和单元号变量将动态替换为连接到 MX 系列时订阅者访问的接口和单元号。
[edit dynamic-profiles ml-bundle-prof]user@host#set interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”配置该
encapsulation multilink-ppp语句以为动态配置文件启用 MLPPP 捆绑。[edit dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host#set encapsulation multilink-ppp为此示例配置以下 MLPPP 选项:
mrru— 指定最大接收重构单位值,范围为 1500 到 4500 字节。fragment-threshold— 适用于所有数据包和转发类,范围从 128 到 16,320 字节。short-sequence- 确定 MLPPP 的报头格式。默认值为long-sequence。
[edit dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host#user@host#set mrru 1500user@host#set fragment-threshold 320set short-sequence启用对 MLPP 订阅者的支持。
[edit dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host#set family inet要启用
fragmentation-maps支持,您必须配置服务等级并定义流量控制配置文件。[edit dynamic-profiles ml-bundle-prof class-of-service]user@host#set traffic-control-profiles tcp2对于流量控制配置文件,定义以下设置:调度器图、整形速率、保证速率和延迟缓冲速率。
[edit dynamic-profiles ml-bundle-prof class-of-service traffic-control-profiles tcp2]user@host#user@host#set scheduler-map "$junos-cos-scheduler-map"user@host#set shaping-rate "$junos-cos-shaping-rate"user@host#set guaranteed-rate "$junos-cos-guaranteed-rate"set delay-buffer-rate "$junos-cos-delay-buffer-rate"通过设置预定义的动态接口变量 $junos-interface-ifd-name,配置动态配置文件的底层接口,并通过设置预定义的单元号变量 $junos-interface-unit来配置逻辑接口单元。接口和单元号变量将动态替换为连接到 MX 系列时订阅者访问的接口和单元号。
[edit dynamic-profiles ml-bundle-prof class-of-service]user@host#set interfaces “$junos-interface-ifd-name” unit "$junos-interface-unit"对于动态配置文件接口,定义输出流量控制配置文件。
[edit dynamic-profiles ml-bundle-prof class-of-service interfaces “$junos-interface-ifd-name” unit "$junos-interface-unit"]user@host#set output-traffic-control-profile tcp2定义动态配置文件捆绑包所需的分段映射,用于启用链路分段和交织 (LFI)。
[edit dynamic-profiles ml-bundle-prof class-of-service interfaces “$junos-interface-ifd-name” unit "$junos-interface-unit"]user@host#set fragmentation-map fragmap-2如果完成设备配置,请提交配置。
[edit] user@host# commit
结果
在配置模式下,输入 show access、 show services和 show dynamic-profiles 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@host# show access profile ce-l2tp-profile2
access profile {
ce-l2tp-profile2 {
client ce-lac-3 {
user-group-profile ce-lac-1-gp;
l2tp {
multilink;
interface-id not-used;
maximum-sessions-per-tunnel 2000;
shared-secret "$9$2wgUHQF/9pB";
dynamic-profile ml-lns-member-prof;
}
}
}
}
user@host# show services l2tp tunnel-group dyn-l2tp-tunnel-group
services {
l2tp {
tunnel-group dyn-l2tp-tunnel-group {
l2tp-access-profile ce-l2tp-profile2;
aaa-access-profile ce-authenticator;
local-gateway {
address 10.1.1.1;
}
service-device-pool pool1;
dynamic-profile ml-lns-member-prof;
}
}
}
不带混合模式的动态 LNS 成员链路 IFL 的动态配置文件:
user@host# show dynamic-profiles mlp-lns-member-profile
dynamic-profile mlp-lns-member-profile {
interface $junos-interface-ifd-name {
unit $junos-interface-unit” {
dial-options {
l2tp-interface-id dont-care;
dedicated;
}
family mlppp {
bundle $junos-bundle-interface-name ;
service-device-pool pool1;
dynamic-profile mlp-bundle-profile;
}
family inet {
}
}
}
}
具有混合模式的动态 LNS 成员链路 IFL 的动态配置文件:
user@host# show dynamic-profiles mlp-lns-member-profile
dynamic-profile ml-lns-member-prof {
routing-instances {
"$junos-routing-instance" {
interface "$junos-interface-name";
routing-options {
access {
route $junos-framed-route-ip-address-prefix {
next-hop $junos-framed-route-nexthop;
metric $junos-framed-route-cost;
preference $junos-framed-route-distance;
}
}
access-internal {
route $junos-subscriber-ip-address {
qualified-next-hop $junos-interface-name;
}
}
}
}
}
}
interfaces "$junos-interface-ifd-name" {
unit "$junos-interface-unit" {
dial-options {
l2tp-interface-id l2tp-encapsulation;
dedicated;
}
family mlppp {
bundle $junos-bundle-interface-name;
service-device-pool pool2;
dynamic-profile ml-bundle-prof;
}
family inet {
unnumbered-address $junos-loopback-interface;
filter {
input "$junos-input-filter";
output "$junos-output-filter";
}
}
}
class-of-service {
traffic-control-profiles {
tc-profile {
scheduler-map "$junos-cos-scheduler-map";
shaping-rate "$junos-cos-shaping-rate";
overhead-accounting "$junos-cos-shaping-mode" bytes "$junos-cos-byte-adjust";
guaranteed-rate "$junos-cos-guaranteed-rate";
delay-buffer-rate "$junos-cos-delay-buffer-rate";
}
}
interfaces {
"$junos-interface-ifd-name" {
unit "$junos-interface-unit" {
output-traffic-control-profile tc-profile;
classifiers {
dscp GEN-CLASSIFIER-IN;
}
rewrite-rules {
dscp GEN-RW-OUT-DSCP;
}
}
}
}
}
}
user@host# show dynamic-profiles ml-bundle-prof
dynamic-profile ml-bundle-prof {
routing-instances {
"$junos-routing-instance" {
interface "$junos-interface-name";
routing-options {
access {
route $junos-framed-route-ip-address-prefix {
next-hop $junos-framed-route-nexthop;
metric $junos-framed-route-cost;
preference $junos-framed-route-distance;
}
}
access-internal {
route $junos-subscriber-ip-address {
qualified-next-hop $junos-interface-name;
}
}
}
}
}
}
interfaces "$junos-interface-ifd-name" {
unit "$junos-interface-unit" {
encapsulation multilink_ppp;
mrru 1500;
short-sequence;
fragment-threshold 320;
family inet
}
}
}
class-of-service {
traffic-control-profiles {
tcp2 {
scheduler-map "$junos-cos-scheduler-map";
shaping-rate "$junos-cos-shaping-rate";
guaranteed-rate "$junos-cos-guaranteed-rate";
delay-buffer-rate "$junos-cos-delay-buffer-rate";
}
}
interfaces {
"$junos-interface-ifd-name" {
unit "$junos-interface-unit" {
output-traffic-control-profile tcp2;
fragmentation-map fragmap-2
}
}
}
}
验证
确认配置工作正常。
验证订阅者信息
目的
验证基于 LNS 的动态 MLPPP 的用户信息是否正确。
行动
user@host> show subscribers extensive
Type: L2TP
User Name: lns-client
IP Address: 198.51.100.20
IP Netmask: 255.255.255.0
Logical System: default
Routing Instance: default
Interface: si-1/0/0.1073741824
Interface type: Dynamic
Dynamic Profile Name: ml-lns-member-prof
Dynamic Profile Version: 1
State: Active
Radius Accounting ID: 20
Session ID: 20
Bundle Session ID: 21
Login Time: 2011-04-11 10:55:13 PDT
Type: MLPPP
User Name: lns-client
IP Address: 198.51.100.20
IP Netmask: 255.255.255.0
Logical System: default
Routing Instance: default
Interface: si-3/0/0.1073741825
Interface type: Dynamic
Dynamic Profile Name: ml-bundle-prof
Dynamic Profile Version: 1
State: Active
Radius Accounting ID: 21
Session ID: 21
Underlying Session ID: 20
Login Time: 2011-04-11 07:55:59 PDT
意义
已为接口类型为动态的 MLPPP 配置接口的用户 si-1/0/0.1073741824 信息。
使用支持 MLPPP 的动态用户验证混合模式支持?
目的
使用支持 MLPPP 的动态用户验证混合模式接口是否为单链路 PPP 正确协商。
行动
user@host> show interfaces extensive pp0.1073741832
Logical interface pp0.1073741832 (Index 489) (SNMP ifIndex 712)
(Generation 299)
Flags: Up Point-To-Point SNMP-Traps 0x4000 Encapsulation: PPPoE
PPPoE:
State: SessionUp, Session ID: 40,
Session AC name: haverhill1, Remote MAC address: 00:00:5e:00:53:72,
Underlying interface: ge-1/0/0.44 (Index 376)
Traffic statistics:
Input bytes : 1213
Output bytes : 1672
Input packets: 41
Output packets: 49
IPv6 transit statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Local statistics:
Input bytes : 159
Output bytes : 1424
Input packets: 10
Output packets: 18
Transit statistics:
Input bytes : 1054 0 bps
Output bytes : 248 0 bps
Input packets: 31 0 pps
Output packets: 31 0 pps
IPv6 transit statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Keepalive settings: Interval 45 seconds, Up-count 1, Down-count 3
LCP state: Opened
NCP state: inet: Opened, inet6: Opened, iso: Not-configured, mpls:
Not-configured
CHAP state: Closed
PAP state: Success
Protocol inet, MTU: 65531, Generation: 384, Route table: 0
Flags: Sendbcast-pkt-to-re
Addresses, Flags: Is-Primary
Destination: Unspecified, Local: 10.0.0.1, Broadcast: Unspecified,
Generation: 297
Protocol inet6, MTU: 65531, Generation: 385, Route table: 0
Addresses, Flags: Is-Primary
Destination: Unspecified, Local: 2030::1
Generation: 298
Destination: Unspecified, Local: fe80::2a0:a50f:fc64:6ef2
Generation: 299
意义
当支持 MLPPP 的动态用户协商单个链路 PPP 时,结果与非 MLPPP 用户相同;未创建捆绑包 IFL 或 SDB 会话。
验证通过 LAC 接口的隧道式 MLPPP
目的
验证基于 LAC 的 MLPPP 成员链路 IFL 是否正确。
行动
user@host> show interfaces extensive pp0.1073756921
Logical interface pp0.1073756921 (Index 482) (SNMP ifIndex 706)
(Generation 15542)
Flags: Up Point-To-Point SNMP-Traps 0x4000 Encapsulation: PPPoE
PPPoE:
State: SessionUp, Session ID: 37,
Session AC name: haverhill, Remote MAC address: 00:00:5e:00:53:82,
Underlying interface: ge-1/0/0.2040 (Index 457)
Traffic statistics:
Input bytes : 273
Output bytes : 270
Input packets: 13
Output packets: 10
Local statistics:
Input bytes : 138
Output bytes : 155
Input packets: 6
Output packets: 3
Transit statistics:
Input bytes : 135 0 bps
Output bytes : 115 0 bps
Input packets: 7 0 pps
Output packets: 7 0 pps
Keepalive settings: Interval 45 seconds, Up-count 1, Down-count 3
LCP state: Opened
NCP state: inet: Not-configured, inet6: Not-configured, iso: Not-configured, mpls:
Not-configured
CHAP state: Closed
PAP state: Closed
Protocol inet, MTU: 1492, Generation: 15534, Route table: 0
Flags: Sendbcast-pkt-to-re
Protocol mlppp, Multilink bundle: si-1/0/0.1073756922
Service device pool: sipool-1, Dynamic profile: ml-bundle-prof
MTU: 1526, Generation: 15533, Route table: 0
意义
通过隧道传输 PPPoE MLPPP 会话时,捆绑包和成员链路绑定将保持不变。虽然捆绑包 IFL 不参与控制和转发路径,但它仍保留在用户界面中。