Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
本页内容
 

示例:配置动态 LNS MLPPP 订阅者

此示例说明了如何配置动态 L2TP 网络服务器 (LNS) 多链路 (MLPPP) 订阅者。

要求

此示例使用以下硬件和软件组件:

  • 安装了 MPC2 的 MX 系列

  • Junos OS 13.3 或更高版本

配置动态 LNS MLPPP 订阅者之前,请确保您已:

概述

MLPPP 用户由两个 IFL(逻辑接口)、一个成员链路和一个捆绑包组成。对于动态 LNS MLPPP 订阅者,可以使用动态配置文件配置动态成员链路 IFL。成员链路动态配置文件包括 family mlppp 包含捆绑包动态配置文件和服务接口 (si) 或服务接口池的语句。然后,此信息用于创建动态捆绑 IFL。

每个动态捆绑包仅接受一个动态成员链路。如果多个动态成员链路尝试加入同一个动态捆绑包,则系统将使新成员会话失败。

图 1 显示了不同类型的流量如何通过 MX 系列作为 LNS 来终止 MLPPP 捆绑包的网络。

拓扑结构

图 1:在 MX 系列作为 LNS 网络 MLPPP Bundles Terminated at MX Series as the LNS Network终止的 MLPPP 束

显示了通过 LNS 网络传递流量的以下三个域:

  • PPP 域 — 包含数据和语音流量

  • MLPPP 域 — 仅包含数据流量

  • L2TP 域 — 包含所有类型的流量

配置

要配置动态 LNS MLPPP 订阅者,请执行以下作:

CLI 快速配置

要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层次结构级别的 [edit] CLI 中。

使用服务接口池和 L2TP 访问配置文件属性配置隧道组

分步程序

下面的示例要求您在各个配置层级中进行导航。

要为动态 LNS MLPPP 用户配置包含服务接口池和 L2TP 访问配置文件属性的隧道组:

  1. 创建访问配置文件。

    [edit access]user@host# set profile ce-l2tp-profile2

  2. 配置 L2TP (LAC) 访问客户端。

    [edit access profile ce-l2tp-profile2]user@host# set client ce-lac-3

  3. 关联包含 PPP 属性的组配置文件,以申请从此 LAC 客户端以隧道传输的 PPP 会话。

    [edit access profile ce-l2tp-profile2 client ce-lac-3]user@host# set user-group-profile ce-lac-1-gp

  4. 为此示例配置以下 L2TP 访问配置文件属性:

    • L2TP 客户端支持多链路 (MLPPP),适用于订阅者。 multilink L2TP 访问客户端配置文件中的语句确定从 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# set l2tp multilinkuser@host#set l2tp maximum-sessions-per-tunnel 2000 user@host#set l2tp shared-secret password user@host#set dynamic-profile ml-lns-member-prof

  5. 创建隧道组。

    [edit services l2tp]user@host# set tunnel-group dyn-l2tp-tunnel-group

  6. 将隧道访问配置文件设置为等于您为访问配置文件定义的设置。

    [edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host# set l2tp-access-profile ce-l2tp-profile2

  7. 设置 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

  8. 为 L2TP 隧道设置本地网关地址。

    [edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host# set local-gateway address 10.1.1.1

  9. 为动态 LNS MLPPP 订阅者指定服务接口池。

    [edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host# set service-device-pool pool1

  10. 指定用于创建动态 LNS MLPPP 成员链路的动态配置文件。

    [edit services l2tp tunnel-group dyn-l2tp-tunnel-group]user@host# set dynamic-profile ml-lns-member-prof

  11. 如果完成设备配置,请提交配置。

为不支持混合模式的动态 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 配置动态配置文件

  1. 指定之前在使用 服务接口和 L2TP 访问配置文件属性池配置隧道组中用于创建动态 LNS MLPPP 成员链路的动态配置文件。

    [edit dynamic-profiles]user@host# set ml-lns-member-prof

  2. 通过设置预定义的动态接口变量 $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”

  3. 对于 $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

  4. 为 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”

  5. 为动态 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

  6. 指定捆绑包的动态配置文件名称。

    [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

  7. 启用对 LNS 订阅者和 LNS 长路由的支持。

    [edit dynamic-profiles ml-lns-member-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host# set family inet

  8. 如果完成设备配置,请提交配置。

为支持混合模式的动态 LNS 成员链路 IFL 配置动态配置文件

分步程序

下面的示例要求您在各个配置层级中进行导航。

或者,您可以将动态配置文件配置为支持混合模式,以便 PPP 订阅者能够使用动态配置文件成功登录。

以下示例显示了支持动态配置文件的混合模式所需的附加配置。

注意:

CLI 快速配置部分未包含以下配置命令。

  1. 指定之前在使用 服务接口和 L2TP 访问配置文件属性池配置隧道组中用于创建动态 LNS MLPPP 成员链路的动态配置文件。

    [edit dynamic-profiles]user@host# set ml-lns-member-prof

  2. 当客户端设备 (CPE) 用于动态虚拟路由和转发 (VRF) PPP 用户时,您必须配置路由实例及其接口。

    [edit dynamic-profiles ml-lns-member-prof]user@host# set routing-instances "$junos-routing-instance" interface "$junos-interface-name"

  3. 为路由选项配置访问路由。

    [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

  4. 配置路由器的下一跃点、指标和首选项。

    [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# set next-hop $junos-framed-route-nexthopuser@host# set metric $junos-framed-route-costuser@host#set preference $junos-framed-route-distance

  5. 为路由选项配置内部访问路由。

    [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

  6. 为内部路由配置合格下一跃点。

    [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

  7. 请遵循 为不支持混合模式的动态 LNS 成员链路 IFL 配置动态配置文件 中所述的过程,配置动态配置文件的基本设置。

    注意:

    要启用混合模式支持,当 CPE 是 PPP 用户时,还必须向语句添加 family inet 未编号地址以及输入和输出过滤器。

    [edit dynamic-profiles ml-lns-member-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host# set family inet unnumbered-address $junos-loopback-interfaceuser@host# set family inet filter input "$junos-input-filter" output "$junos-output-filter”

  8. 当 CPE 是 PPP 用户时,还必须配置服务等级并定义流量控制配置文件。

    [edit dynamic-profiles ml-lns-member-prof class-of-service]user@host# set traffic-control-profiles tc-profile

  9. 对于流量控制配置文件,定义以下设置:调度器图、整形速率、开销核算、保证速率和延迟缓冲速率。

    [edit dynamic-profiles ml-lns-member-prof class-of-service traffic-control-profiles tc-profile]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" user@host#set delay-buffer-rate "$junos-cos-delay-buffer-rate"

  10. 通过设置预定义的动态接口变量 $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”

  11. 对于动态配置文件接口,定义以下设置:输出流量控制配置文件、分类器和重写规则。

    [edit dynamic-profiles ml-lns-member-prof class-of-service interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host# set output-traffic-control-profile tc-profileuser@host# set classifiers dscp GEN-CLASSIFIER-INuser@host#set rewrite-rules dscp GEN-RW-OUT-DSCP

  12. 如果完成设备配置,请提交配置。

为动态捆绑 IFL 配置动态配置文件

分步程序

下面的示例要求您在各个配置层级中进行导航。

要为动态捆绑 IFL 配置动态配置文件,请在动态配置文件中指定 encapsulation multilink-ppp 语句。 dynamic profile 对于动态捆绑包,IFL 引用自动态 dynamic profile PPPoE 和 LNS 成员链路 IFL。

您必须使用服务等级静态配置该 fragmentation-maps 语句,并在捆绑包动态配置文件中进行分配。您还可以设置以下可选 MLPPP 参数:MRRU、短序列和片段阈值。以下示例说明如何为动态捆绑 IFL 配置动态配置文件。

  1. 指定捆绑包的动态配置文件名称。

    [edit dynamic-profiles}user@host# set ml-bundle-prof

  2. 尽管 MLPPP 成员链路会处理身份验证和路由实例分配,但如果分配了非默认路由实例,则必须在分配的路由实例下配置捆绑 IFL。因此,还必须在捆绑包 dynamic-profile 中配置 routing-instances。

    [edit dynamic-profiles ml-bundle-prof]user@host# set routing-instances "$junos-routing-instance" interface "$junos-interface-name"

  3. 为路由选项配置访问路由。

    [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

  4. 配置路由器的下一跃点、指标和首选项。

    [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# set next-hop $junos-framed-route-nexthopuser@host# set metric $junos-framed-route-costuser@host#set preference $junos-framed-route-distance

  5. 为路由选项配置内部访问路由。

    [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

  6. 为内部路由配置合格下一跃点。

    [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

  7. 通过设置预定义的动态接口变量 $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”

  8. 配置该 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

  9. 为此示例配置以下 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# set mrru 1500user@host# set fragment-threshold 320user@host#set short-sequence

  10. 启用对 MLPP 订阅者的支持。

    [edit dynamic-profiles ml-bundle-prof interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit”]user@host# set family inet

  11. 要启用 fragmentation-maps 支持,您必须配置服务等级并定义流量控制配置文件。

    [edit dynamic-profiles ml-bundle-prof class-of-service]user@host# set traffic-control-profiles tcp2

  12. 对于流量控制配置文件,定义以下设置:调度器图、整形速率、保证速率和延迟缓冲速率。

    [edit dynamic-profiles ml-bundle-prof class-of-service traffic-control-profiles tcp2]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" user@host#set delay-buffer-rate "$junos-cos-delay-buffer-rate"

  13. 通过设置预定义的动态接口变量 $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"

  14. 对于动态配置文件接口,定义输出流量控制配置文件。

    [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

  15. 定义动态配置文件捆绑包所需的分段映射,用于启用链路分段和交织 (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

  16. 如果完成设备配置,请提交配置。

结果

在配置模式下,输入 show accessshow servicesshow dynamic-profiles 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。

不带混合模式的动态 LNS 成员链路 IFL 的动态配置文件:

具有混合模式的动态 LNS 成员链路 IFL 的动态配置文件:

验证

确认配置工作正常。

验证订阅者信息

目的

验证基于 LNS 的动态 MLPPP 的用户信息是否正确。

行动

意义

已为接口类型为动态的 MLPPP 配置接口的用户 si-1/0/0.1073741824 信息。

使用支持 MLPPP 的动态用户验证混合模式支持?

目的

使用支持 MLPPP 的动态用户验证混合模式接口是否为单链路 PPP 正确协商。

行动

意义

当支持 MLPPP 的动态用户协商单个链路 PPP 时,结果与非 MLPPP 用户相同;未创建捆绑包 IFL 或 SDB 会话。

验证通过 LAC 接口的隧道式 MLPPP

目的

验证基于 LAC 的 MLPPP 成员链路 IFL 是否正确。

行动

意义

通过隧道传输 PPPoE MLPPP 会话时,捆绑包和成员链路绑定将保持不变。虽然捆绑包 IFL 不参与控制和转发路径,但它仍保留在用户界面中。