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

显示了以下两个域在 MX 系列上终止流量:
PPP 域 — 包含数据和语音流量
MLPPP 域 — 仅包含数据流量
配置
要为已终止和隧道订阅者配置静态 PPPoE MLPPP,请执行以下任务:
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit]
级的 CLI 中。
[edit] set interfaces ge-3/0/0 vlan-tagging set interfaces ge-3/0/0 unit 1 encapsulation ppp-over-ether vlan-id 1 set interfaces ge-3/0/0 unit 2 encapsulation ppp-over-ether vlan-id 2 set interfaces ge-3/0/0 unit 3 encapsulation ppp-over-ether vlan-id 3 set interfaces pp0 set interfaces pp0 unit 1 keepalives interval 30 set interfaces pp0 unit 1 pppoe-options underlying interface ge-3/0/0.1 server set interfaces pp0 unit 1 ppp-options pap chap dynamic-profile pp0-l2l3-service prof set interfaces pp0 unit 1 family mlppp bundle si-1/0/0.1 set interfaces pp0 unit 1 family inet unnumbered-address lo0.0 set interfaces pp0 unit 1 family inet6 address 2001:db8:204::1:1:2/64 set interfaces pp0 unit 2 keepalives interval 30 set interfaces pp0 unit 2 pppoe-options underlying-interface ge-3/0/0.2 server set interfaces pp0 unit 2 ppp-options pap dynamic-profile pp0-l2l3-service prof set interfaces pp0 unit 2 family mlppp bundle si-1/0/0.2 set interfaces pp0 unit 3 keepalives interval 30 set interfaces pp0 unit 3 pppoe-options underlying interface ge-3/0/0.3 server set interfaces pp0 unit 3 ppp-options pap chap dynamic-profile pp0-l2l3-service prof set interfaces pp0 unit 3 family mlppp bundle si-1/0/0.3 set interfaces pp0 unit 3 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
配置静态 pp0 成员链路 IFL
分步过程
下面的示例要求您在各个配置层级中进行导航。
要配置静态 PPPoE 成员链路,请使用语 family mlppp
句指定静态捆绑包。以下底层接口支持 PPPoE 会话:以太网接口、静态和动态 VLAN、通过以太网接口的 VLAN 多路分离 (demux) 和通过聚合以太网接口的 VLAN 多路分离。
您还必须在pp0
接口中为隧道订阅者配置family inet
语句。该family inet
语句允许安装 L2TP 长路由,并支持查找引擎将控制数据包引导至路由引擎。
以下示例说明如何通过静态 VLAN 配置 pp0
成员链路 IFL 以支持以下不同类型的订阅者:
si-1/0/0.1
—已终止和隧道的 PPP 和 MLPPP 订阅者均可成功登录。si-1/0/0.2
—只有已终止的 MLPPP 订阅者才能成功登录。si-1/0/0.3
—已终止和隧道的 MLPPP 订阅者可以成功登录。
为 PPPoE 会话创建千兆以太网底层接口,
ge-3/0/0
并启用 VLAN 标记。[edit interfaces]
user@host#set ge-3/0/0 vlan-tagging
ge-3/0/0
对于接口,为三个 VLAN 配置以太网 PPP 封装。[edit interfaces ge-3/0/0]
user@host#
user@host#set unit 1 encapsulation ppp-over-ether vlan-id 1
user@host#set unit 2 encapsulation ppp-over-ether vlan-id 2
set unit 3 encapsulation ppp-over-ether vlan-id 3
配置动态 PPPoE
pp0
用户接口以支持 PPPoE 会话。[edit interfaces]
user@host#set pp0
配置三个逻辑接口中的第一个。
分步过程
为
pp0
MX 系列上的用户接口配置第一个逻辑接口,并为激活值设置 30 秒的间隔。[edit interfaces pp0]
user@host#set unit 1 keepalives interval 30
为动态配置文件中的动态 PPPoE 逻辑接口配置底层接口
ge-3/0/0.1
和 PPPoE 服务器模式。[edit interfaces pp0 unit 1]
user@host#set pppoe-options underlying-interface ge-3/0/0.1 server
在动态配置文件中配置特定于 PPP 的接口属性:
pap
和chap
,dynamic-profile
并将 设置为服务动态配置文件。注意:在 PPP 中协商链路控制协议 (LCP) 时,将应用动态配置文件。
[edit interfaces pp0 unit 1]
user@host#set ppp-options pap chap dynamic-profile pp0-l2l3-service prof
使用语
family mlppp
句为 MLPPP 订阅者的 PPPoE 成员链路配置静态捆绑包。注意:该
family mlppp
语句确定从底层接口传入的用户是否支持 MLPPP。[edit interfaces pp0 unit 1]
user@host#set family mlppp bundle si-1/0/0.1
family inet
为 PPP 用户、隧道 PPP 和 MLPPP 用户所需的协议家族配置语句和未编号地址。[edit interfaces pp0 unit 1]
user@host#set family inet unnumbered-address lo0.0
(选答)启用
family inet6
对 PPP 和 MLPPP 订阅者的混合模式支持的语句和地址。[edit interfaces pp0 unit 1]
user@host#set family inet6 address 2001:db8:204::1:1:2/64
配置三个逻辑接口中的第二个。
分步过程
为
pp0
MX 系列上的用户接口配置第二个逻辑接口,并为激活值设置 30 秒的间隔。[edit interfaces pp0]
user@host#set unit 2 keepalives interval 30
为动态配置文件中的动态 PPPoE 逻辑接口配置底层接口
ge-3/0/0.2
和 PPPoE 服务器模式。[edit interfaces pp0 unit 2]
user@host#set pppoe-options underlying interface ge-3/0/0.2 server
在动态配置文件中配置特定于 PPP 的接口属性:
pap
,并将 设置为dynamic-profile
服务动态配置文件。注意:在 PPP 中协商链路控制协议 (LCP) 时,将应用动态配置文件。
[edit interfaces pp0 unit 2]
user@host#set ppp-options pap dynamic-profile pp0-l2l3-service prof
使用语
family mlppp
句为 MLPPP 订阅者的 PPPoE 成员链路配置静态捆绑包。注意:该
family mlppp
语句确定从底层接口传入的用户是否支持 MLPPP。[edit interfaces pp0 unit 2]
user@host#set family mlppp bundle si-1/0/0.2
配置三个逻辑接口中的最后一个。
分步过程
为
pp0
MX 系列上的用户接口配置第三个逻辑接口,并为激活值设置 30 秒的间隔。[edit interfaces pp0]
user@host#set unit 3 keepalives interval 30
为动态配置文件中的动态 PPPoE 逻辑接口配置底层接口
ge-3/0/0.3
和 PPPoE 服务器模式。[edit interfaces pp0 unit 3]
user@host#set pppoe-options underlying interface ge-3/0/0.3 server
在动态配置文件中配置特定于 PPP 的接口属性:
pap
和chap
,dynamic-profile
并将 设置为服务动态配置文件。注意:在 PPP 中协商链路控制协议 (LCP) 时,将应用动态配置文件。
[edit interfaces pp0 unit 3]
user@host#set ppp-options pap chap dynamic-profile pp0-l2l3-service prof
使用语
family mlppp
句为 MLPPP 订阅者的 PPPoE 成员链路配置静态捆绑包。注意:该
family mlppp
语句确定从底层接口传入的用户是否支持 MLPPP。[edit interfaces pp0 unit 3]
user@host#set family mlppp bundle si-1/0/0.3
配置隧道订阅者。
[edit interfaces pp0 unit 3]
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 interfaces
命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@host# show interfaces ge-3/0/0 interfaces { ge-3/0/0 { vlan-tagging; unit 1 { encapsulation ppp-over-ether; vlan-id 1; } unit 2 { encapsulation ppp-over-ether; vlan-id 2; } unit 3 { encapsulation ppp-over-ether; vlan-id 3; } } pp0 { unit 1 { keepalives interval 30; pppoe-options { underlying-interface ge-3/0/0.1; server; } ppp-options { pap; chap; dynamic-profile pp0-l2l3-service-prof; } family mlppp { bundle si-1/0/0.1; } family inet { unnumbered-address lo0.0; } family inet6 { address 2001:db8:204::1:1:2/64; } } unit 2 { keepalives interval 30; pppoe-options { underlying-interface ge-3/0/0.2; server; } ppp-options { pap; dynamic-profile pp0-l2l3-service-prof; } family mlppp { bundle si-1/0/0.2; } } unit 3 { keepalives interval 30; pppoe-options { underlying-interface ge-3/0/0.3; server; } ppp-options { pap; chap; dynamic-profile pp0-l2l3-service-prof; } family mlppp { bundle si-1/0/0.3; } 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; } } } }
验证
确认配置工作正常。
验证捆绑包 IFL 信息
目的
验证捆绑 IFL 信息对于 PPPoE 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:
pp0.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: 10.80.80.1, Broadcast: Unspecified, Generation: 150
意义
由于实现的特殊性,与捆绑包关联的以下错误计数始终显示 0:数据包丢弃(字节)、分段丢弃(字节)、分段超时、缺少序列号、乱序序列号、超出范围的序列号、数据包数据缓冲区溢出和分段数据缓冲区溢出以及超出 MRRU。
验证成员链接 IFL 信息
目的
验证成员链路 IFL 信息对于订阅者是否正确。
行动
user@host> show interfaces extensive pp0.1073756923
Logical interface pp0.1073756923 (Index 484) (SNMP ifIndex 708)
(Generation 15544)
Flags: Up Point-To-Point SNMP-Traps 0x4000 Encapsulation: PPPoE
PPPoE:
State: SessionUp, Session ID: 38,
Session AC name: haverhill, Remote MAC address: 00:00:5e:00:53:42,
Underlying interface: ge-1/0/0.50 (Index 423)
Bandwidth: 1000mbps
Traffic statistics:
Input bytes : 609
Output bytes : 489
Input packets: 21
Output packets: 22
Local statistics:
Input bytes : 133
Output bytes : 377
Input packets: 7
Output packets: 8
Transit statistics:
Input bytes : 476 0 bps
Output bytes : 112 0 bps
Input packets: 14 0 pps
Output packets: 14 0 pps
Keepalive settings: Interval 10 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: Success
PAP state: Closed
Protocol mlppp, Multilink bundle: si-1/0/0.1073756924
Service interface: si-1/0/0, Dynamic profile: ml-bundle-service-prof
MTU: 1526, Generation: 15535, Route table: 0
意义
逻辑接口 pp0.1073756923
已配置了 PPPoE、多链路束 si-1/0/0.1073756924
和协议 mlppp
。
验证订阅者信息
目的
验证通过 PPPoE 的静态 MLPPP 的用户信息是否正确。
行动
root@host> show subscribers detail
Type: PPPoE
User Name: user
IP Address: 10.4.1.2
IP Netmask: 255.255.0.0
Logical System: default
Routing Instance: default
Interface: pp0.20
Interface type: Static
MAC Address: 00:00:5e:00:53:32
State: Active
Radius Accounting ID: 4
Session ID: 4
Bundle Session ID: 5
Login Time: 2012-02-28 10:32:24 PST
Type: MLPPP
User Name: user
IP Address: 10.4.1.2
IP Netmask: 255.255.0.0
Logical System: default
Routing Instance: default
Interface: si-1/0/0.1020
Interface type: Static
State: Active
Radius Accounting ID: 5
Session ID: 5
Underlying Session ID: 4
Login Time: 2012-02-28 10:32:24 PST
意义
已为带接口 pp0.20
的静态 PPPoE 和带接口 si-1/0/0.1020
的静态 MLPPP 配置了用户信息。