示例:通过 ATM 配置静态 PPPoE 用户接口
此示例说明了基于 ATM 的以太网点对点协议 (PPPoE) 配置,该配置通过 MX 系列路由器上的静态 ATM 底层接口创建静态 PPPoE (pp0) 用户接口。路由器必须具有模块端口集中器/模块化接口卡 (MPC/MIC) 接口,且使用带有小型可插拔收发器 (SFP) 的 ATM MIC。
您还可以在安装了 SFP 的 MX 系列路由器上通过静态 ATM 底层接口配置 动态 PPPoE 接口。有关信息,请参阅 示例:通过 ATM 配置动态 PPPoE 用户接口。
要求
此示例使用以下软件和硬件组件:
MX 系列 5G 通用路由平台
带 SFP 的 ATM MIC(型号 MIC-3D-8OC3-2OC12-ATM)和兼容的 MPC1 或 MPC2
开始之前:
确保您正在使用的 MX 系列路由器已安装并运行有 SFP 的 ATM MIC。
有关适用于带 SFP 的 ATM MIC 的兼容 MPC 的信息,请参阅 MX 系列接口模块参考。
有关在 MX 系列路由器中安装 MPC 和 MIC 的信息,请参阅 MX 系列路由器型号的 硬件指南 。
确保您了解如何配置和使用静态 ATM 接口。
请参阅 ATM 接口概述。
概述
通过使用具有 SFP 和支持的 MPC 的 ATM MIC,您可以将 MX 系列路由器配置为使用 ATM 适配层 5 (AAL5) 永久虚拟连接 (PVC) 通过 ATM 网络支持静态 PPPoE 用户访问。MX 系列路由器上的 PPPoE-over-ATM 配置由一个或多个通过静态 ATM 底层接口静态创建的 PPPoE (pp0) 逻辑用户接口组成。MX 系列路由器上的 PPPoE-over-ATM 连接也支持大多数在终止连接和隧道(L2TP 接入集中器或 LAC)连接上支持的 PPPoE 和用户服务功能。
此示例包含在 MX 系列路由器上配置静态 PPPoE-over-ATM 订阅者访问的以下基本步骤:
使用虚拟路径标识符 (VPI) 6 静态配置 ATM 物理接口 at-1/0/6。
在 ATM 物理接口 (AT-1/0/6.2) 上使用以下属性静态配置逻辑单元 2:
PPPoE-over-ATM 逻辑链路控制 (LLC) 封装 (
ppp-over-ether-over-atm-llc)VPI 上的虚拟电路标识符 (VCI) 2 6。VPI 和 VCI 的组合可配置 ATM AAL5 PVC,以通过 ATM 网络进行访问。
(选答)层次结构级别上特定于 PPPoE 的选项
[edit interfaces interface-name unit logical-unit-number family pppoe]注意:对于 MX 系列路由器上的动态或静态 PPPoE-over-ATM 配置,您必须在层次结构级别的节
[edit interfaces interface-name unit logical-unit-number]中family pppoe指定特定于 PPPoE 的选项。对于这些配置,不支持在层次结构级别的节[edit interfaces interface-name unit logical-unit-number]中pppoe-underlying-options指定特定于 PPPoE 的选项。
至少使用以下属性静态配置
pp0逻辑用户接口 (pp0.2):底层 ATM 接口的名称 (at-1/0/6.2)
server将路由器配置为 PPPoE 服务器的语句(IPv4) 或
inet6(IPv6) 协议家族的inet未编号地址 (lo0.0)
在静态 PPPoE-over-ATM 配置中,在
[edit interfaces pp0 unit logical-unit-number]层次结构级别配置的每个pp0逻辑接口都对应一个静态 PPPoE 用户接口。
配置
要通过底层 ATM 接口配置静态 PPPoE 用户接口,请执行以下作:
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit] 级的 CLI 中。
# ATM Physical Interface set interfaces at-1/0/6 atm-options vpi 6 # # Logical Unit 2 set interfaces at-1/0/6 unit 2 encapsulation ppp-over-ether-over-atm-llc set interfaces at-1/0/6 unit 2 vci 6.2 set interfaces at-1/0/6 unit 2 family pppoe access-concentrator ac-pppoeoa set interfaces at-1/0/6 unit 2 family pppoe duplicate-protection set interfaces at-1/0/6 unit 2 family pppoe max-sessions 3 set interfaces at-1/0/6 unit 2 family pppoe max-sessions-vsa-ignore set interfaces at-1/0/6 unit 2 family pppoe short-cycle-protection lockout-time-min 120 set interfaces at-1/0/6 unit 2 family pppoe short-cycle-protection lockout-time-max 240 # # Static PPPoE Subscriber Interface set interfaces pp0 unit 2 ppp-options chap set interfaces pp0 unit 2 pppoe-options underlying-interface at-1/0/6.2 set interfaces pp0 unit 2 pppoe-options server set interfaces pp0 unit 2 keepalives interval 10 set interfaces pp0 unit 2 family inet unnumbered-address lo0.0
配置 ATM 物理接口
分步过程
要配置 ATM 物理接口,请执行以下作:
指定要在物理接口上配置特定于 ATM 的选项。
[edit interfaces at-1/0/6] user@host# edit atm-options
在物理接口上配置一个或多个 VPI。
[edit interfaces at-1/0/6 atm-options] user@host# set vpi 6
结果
[edit]从配置模式下的层次结构级别,发出show interfaces at-1/0/6命令以确认 ATM 物理接口配置的结果。如果输出未显示预期的配置,请重复此示例中的说明进行更正。
[edit]
user@host# show interfaces at-1/0/6
atm-options {
vpi 6;
}
如果完成 ATM 物理接口的配置,请从配置模式输入 commit 。
在逻辑单元 2 上配置封装、VCI 和 PPPoE 选项
分步过程
要在逻辑单元 2 上配置封装、VCI 和 PPPoE 选项:
在接口上配置 PPPoE-over-ATM LLC 封装。
[edit interfaces at-1/0/6 unit 2] user@host# set encapsulation ppp-over-ether-over-atm-llc
为逻辑接口配置 VCI。
[edit interfaces at-1/0/6 unit 2] user@host# set vci 6.2
此语句在 VPI 6 上配置 VCI 2。
指定要配置 PPPoE 协议家族。
[edit interfaces at-1/0/6 unit 2] user@host# edit family pppoe
为动态用户接口配置特定于 PPPoE 的其他选项。
[edit interfaces at-1/0/6 unit 2 family pppoe] user@host# set duplicate-protection user@host# set short-cycle-protection lockout-time-min 120 lockout-time-max 240 user@host# set max-sessions 3 user@host# set max-sessions-vsa-ignore user@host# set access-concentrator ac-pppoeoa
结果
从配置模式下的 [edit] 层次结构级别,发出 show interfaces at-1/0/6.2 命令,确认逻辑单元 2 上的配置结果。如果输出未显示预期的配置,请重复此示例中的说明进行更正。
[edit]
user@host# show interfaces at-1/0/6.2
encapsulation ppp-over-ether-over-atm-llc;
vci 6.2;
family pppoe {
access-concentrator ac-pppoeoa;
duplicate-protection;
max-sessions 3;
max-sessions-vsa-ignore;
short-cycle-protection {
lockout-time-min 120;
lockout-time-max 240;
}
}
如果完成逻辑单元 2 的配置,请从配置模式输入 commit 。
配置静态 PPPoE 用户接口
分步过程
要配置静态 PPPoE 用户接口,请执行以下作:
指定要在逻辑单元 2 上配置
pp0用户接口。[edit] user@host# edit interfaces pp0 unit 2
指定要为用户接口配置 PPP 选项。
[edit interfaces pp0 unit 2] user@host# edit ppp-options
为用户接口配置质询握手身份验证协议 (CHAP) 身份验证。
[edit interfaces pp0 unit 2 ppp-options] user@host# set chap user@host# up
指定要配置特定于 PPPoE 的选项。
[edit interfaces pp0 unit 2] user@host# edit pppoe-options
将 PPPoE 用户接口与底层 ATM 接口进行关联。
[edit interfaces pp0 unit 2 pppoe-options] user@host# set underlying-interface at-1/0/6.2
将路由器配置为 PPPoE 服务器,也称为远程访问集中器。
[edit interfaces pp0 unit 2 pppoe-options] user@host# set server user@host# up
配置发送激活请求的时间间隔。
[edit interfaces pp0 unit 2] user@host# set keepalives interval 10
指定要配置 IPv4 (
inet) 协议家族。[edit interfaces pp0 unit 2] user@host# edit family inet
为协议家族配置未编号的地址。
[edit interfaces pp0 unit 2 family inet] user@host# set unnumbered-address lo0.0
结果
从配置模式下的 [edit] 层次结构级别,发出 show interfaces pp0 命令,确认静态 PPPoE 用户接口配置的结果。如果输出未显示预期的配置,请重复此示例中的说明进行更正。
[edit]
user@host# show interfaces pp0
unit 2 {
ppp-options {
chap;
}
pppoe-options {
underlying-interface at-1/0/6.2;
server;
}
keepalives interval 10;
family inet {
unnumbered-address lo0.0;
}
}
如果完成静态 PPPoE 用户接口的配置,请从配置模式输入 commit 。
验证
要确认静态 PPPoE 用户接口 pp0.2 已在 ATM 底层接口 at-1/0/6.2 上正确配置,请执行以下作:
验证 ATM 物理接口配置
目的
验证 ATM 物理接口 AT-1/0/6 是否配置正确,以便与 ATM PVC 配合使用。
行动
在作模式下,发出 show interfaces at-1/0/6 命令。
为简洁起见,此 show 命令输出仅包含与 at-1/0/6 物理接口相关的配置。系统上的任何其他配置都已替换为省略号 (...)。
user@host> show interfaces at-1/0/6
Physical interface: at-1/0/6, Enabled, Physical link is Down
Interface index: 179, SNMP ifIndex: 598
Link-level type: ATM-PVC, MTU: 2048, Clocking: Internal, SDH mode, Speed: OC3, Loopback: None, Payload scrambler: Enabled
Device flags : Present Running Down
Link flags : None
CoS queues : 8 supported, 8 maximum usable queues
Schedulers : 0
Current address: 00:00:5e:00:53:9b
Last flapped : 2012-09-19 07:57:59 PDT (07:46:56 ago)
Input rate : 0 bps (0 pps)
Output rate : 0 bps (0 pps)
SDH alarms : LOL, LOS
SDH defects : LOL, LOS, LOP, BERR-SF, HP-FERF
VPI 6
Flags: Active
Total down time: 0 sec, Last down: Never
Traffic statistics:
Input packets: 0
Output packets: 0
...
意义
ATM-PVC 链路级别类型字段中的表示 ATM 物理接口 AT-1/0/6 上正在使用 ATM 永久虚拟电路的封装。 Active VPI 6 的标志表示虚拟路径已启动且可运行。
验证逻辑单元 2 上的封装、VCI 和 PPPoE 选项配置
目的
验证是否已在逻辑单元 2 (at-1/0/6.2) 上正确配置封装、VCI 和 PPPoE 设置。
行动
在作模式下,发出 show interfaces at-1/0/6.2 命令。
user@host> show interfaces at-1/0/6.2
Logical interface at-1/0/6.2 (Index 345) (SNMP ifIndex 1990)
Flags: Device-Down Point-To-Point SNMP-Traps 0x4000 Encapsulation: PPPoE-over-ATM-LLC
Input packets : 0
Output packets: 0
Protocol pppoe
Dynamic Profile: None,
Service Name Table: None,
Max Sessions: 3, Max Sessions VSA Ignore: On,
Duplicate Protection: On, Short Cycle Protection: mac-address,
AC Name: ac-pppoeoa
VCI 6.2
Flags: Active
Total down time: 0 sec, Last down: Never
Input packets : 0
Output packets: 0
意义
PPPoE-over-ATM-LLC 在封装字段中表示逻辑接口 at-1/0/6.2 已正确配置用于 PPPoE-over-ATM LLC 封装。 Protocol pppoe 指示已在逻辑接口上正确配置 PPPoE 协议家族。 Active VCI 6.2 的标志表示 VPI 6 上的 VCI 2 已启动且可运行。
验证静态 PPPoE 用户接口配置
目的
验证静态 PPPoE 用户接口 (pp0.2) 是否配置正确。
行动
在作模式下,发出 show interfaces pp0 命令。
user@host> show interfaces pp0
Physical interface: pp0, Enabled, Physical link is Up
Interface index: 131, SNMP ifIndex: 505
Type: PPPoE, Link-level type: PPPoE, MTU: 1532
Device flags : Present Running
Interface flags: Point-To-Point SNMP-Traps
Link type : Full-Duplex
Link flags : None
Logical interface pp0.2 (Index 360) (SNMP ifIndex 1991)
Flags: Hardware-Down Point-To-Point SNMP-Traps 0x4000 Encapsulation: PPPoE
PPPoE:
State: SessionDown, Session ID: None,
Underlying interface: at-1/0/6.2 (Index 345)
Input packets : 0
Output packets: 0
Keepalive settings: Interval 10 seconds, Up-count 1, Down-count 3
LCP state: Not-configured
NCP state: inet: Not-configured, inet6: Not-configured, iso: Not-configured, mpls: Not-configured
CHAP state: Closed
PAP state: Closed
Protocol inet, MTU: 1492
Flags: Sendbcast-pkt-to-re, Protocol-Down
Addresses, Flags: Dest-route-down Is-Preferred Is-Primary
Destination: 198.51.100/24, Local: 198.51.100.11
意义
PPPoE 链路级别类型字段中表示物理接口上正在使用 pp0 PPPoE 封装。 PPPoE 封装字段表示 PPPoE 封装也在 pp0.2 逻辑用户接口上使用。底层接口字段表示已 at-1/0/6.2 正确配置为静态 PPPoE 用户接口的底层接口。 Protocol inet 指示 IPv4 协议家族已在 pp0.2 逻辑用户接口上正确配置。
验证 PPPoE 底层接口配置
目的
验证底层接口是否已正确配置,以便通过 ATM 进行静态 PPPoE 用户访问。
行动
在作模式下,发出 show pppoe underlying-interfaces at-1/0/6.2 extensive 命令。
user@host> show pppoe underlying-interfaces at-1/0/6.2 extensive
at-1/0/6.2 Index 345
State: Static, Dynamic Profile: None,
Max Sessions: 3, Max Sessions VSA Ignore: On,
Active Sessions: 0,
Service Name Table: None,
Duplicate Protection: On, Short Cycle Protection: mac-address,
AC Name: ac-pppoeoa,
PacketType Sent Received
PADI 0 0
PADO 0 0
PADR 0 0
PADS 0 0
PADT 0 0
Service name error 0 0
AC system error 0 0
Generic error 0 0
Malformed packets 0 0
Unknown packets 0 0
Lockout Time (sec): Min: 120, Max: 240
Total clients in lockout: 0
Total clients in lockout grace period: 0
意义
此命令表示 ATM 逻辑接口 at-1/0/6.2 已正确配置为 PPPoE 底层接口。 Static 在“状态”字段中表示 at-1/0/0/.2 为静态配置。其余字段显示有关在 [edit interfaces at-1/0/6 unit 2 family pppoe] 层次结构级别上为 PPPoE 底层接口配置的特定于 PPPoE 的接口选项的信息。“锁定时间”字段(仅当显示 extensive 输出级别时才会显示在此命令中)显示为 PPPoE 底层接口配置的最短锁定时间(120 秒)和最长锁定时间(240 秒)。