示例:配置静态 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 1user@host#set unit 2 encapsulation ppp-over-ether vlan-id 2set unit 3 encapsulation ppp-over-ether vlan-id 3配置动态 PPPoE
pp0用户接口以支持 PPPoE 会话。[edit interfaces]user@host#set pp0配置三个逻辑接口中的第一个。
分步程序
为
pp0MX 系列上的用户接口配置第一个逻辑接口,并为激活值设置 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 inetPPP用户、隧道式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
配置三个逻辑接口中的第二个。
分步程序
为
pp0MX 系列上的用户接口配置第二个逻辑接口,并为激活值设置 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
配置三个逻辑接口中的最后一个。
分步程序
为
pp0MX 系列上的用户接口配置第三个逻辑接口,并为保持活动值设置 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:
创建静态 (
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 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 信息
目的
验证 PPPoE MLPPP 订阅者的捆绑 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:
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 配置了用户信息。