配置 PPPoE 订阅者会话锁定
您可以将路由器配置为在一段时间内无法重新连接,暂时锁定失败的或短周期的 PPPoE 订阅者会话。PPPoE 订阅者会话可以驻留在 VLAN、VLAN 多路复用或 PPPoE-over-ATM 底层接口上。
开始之前:
配置 PPPoE 底层接口。
要配置用于 PPPoE 动态配置文件的底层接口,请参阅 为动态 PPPoE 用户接口配置底层接口。
要为底层接口配置 PPPoE 系列,请参阅 为底层接口配置 PPPoE 系列。
要配置临时锁定 PPPoE 订阅者会话:
- 指定您希望在底层接口上配置 PPPoE 特定的选项:
对于 VLAN 多路分离(多路分离)逻辑接口动态配置文件中的 PPPoE 系列:
[edit dynamic-profiles profile-name interfaces demux0 unit logical-unit-number] user@host# edit family pppoe
对于动态配置文件中的 PPPoE 系列:
[edit dynamic-profiles profile-name interfaces interface-name unit logical-unit-number] user@host# edit family pppoe
对于动态配置文件中的 PPPoE 底层接口:
[edit dynamic-profiles profile-name interfaces interface-name unit logical-unit-number] user@host# edit pppoe-underlying-options
对于底层接口上的 PPPoE 系列:
[edit interfaces interface-name unit logical-unit-number] user@host# edit family pppoe
对于采用 PPPoE 封装的底层接口:
[edit interfaces interface-name unit logical-unit-number] user@host# edit pppoe-underlying-options
对于动态配置文件中的 PPPoE 系列,适用于 PPPoE-over-ATM 逻辑接口:
[edit dynamic-profiles profile-name interfaces at-fpc/pic/port unit logical-unit-number] user@host# edit family pppoe
对于底层 ATM 逻辑接口上的 PPPoE 系列:
[edit interfaces at-fpc/pic/port unit logical-unit-number] user@host# edit family pppoe
- 当具有相同媒体访问控制 (MAC) 源地址的 PPPoE 客户端会话已在该接口上处于活动状态时,启用重复保护,以防止在同一底层接口上对动态或静态 PPPoE 客户端会话进行协商。
[edit interfaces interface-name unit logical-unit-number pppoe-underlying-options] user@host# set duplicate-protection
最佳实践:配置 PPPoE 订阅者会话锁定时,建议启用重复保护,以确保每个 PPPoE 会话的 MAC 源地址在底层接口上都是唯一的。
- 使用以下过滤机制之一启用 PPPoE 订阅者会话锁定,以识别锁定的订阅者会话:
基于媒体访问控制 (MAC) 地址的用户会话锁定(默认)
要配置默认锁定期为 1 到 300 秒的基于 MAC 的用户会话锁定:
[edit interfaces interface-name unit logical-unit-number pppoe-underlying-options] user@host# set short-cycle-protection
要配置非默认锁定期的基于 MAC 的订阅者会话锁定:
[edit interfaces interface-name unit logical-unit-number pppoe-underlying-options] user@host# set short-cycle-protection lockout-time-min minimum-seconds lockout-time-max maximum-seconds
基于代理电路标识符 (ACI) 的用户会话锁定
要配置默认锁定期基于 ACI 的订阅者会话锁定:
[edit interfaces interface-name unit logical-unit-number pppoe-underlying-options] user@host# set short-cycle-protection filter aci
例如,以下语句根据动态 VLAN 多路分解底层接口上的订阅者会话的 ACI 信息配置临时锁定。它使用默认锁定时间范围 1 到 300 秒。
[edit dynamic-profiles my-demux-vlan-profile interfaces demux0 unit “$junos-interface-unit” family pppoe] user@host# set short-cycle-protection filter aci
要配置非默认锁定期的基于 ACI 的订阅者会话锁定:
[edit interfaces interface-name unit logical-unit-number pppoe-underlying-options] user@host# set short-cycle-protection lockout-time-min minimum-seconds lockout-time-max maximum-seconds filter aci
例如,以下语句根据动态 VLAN 底层接口上的订阅者会话的 ACI 信息配置临时锁定。它指定 20 到 120 秒范围内的非默认锁定时间。
[edit dynamic-profiles my-vlan-profile interfaces “$junos-interface-ifd-name” unit “$junos-interface-unit” pppoe-underlying options] user@host# set short-cycle-protection lockout-time-min 20 lockout-time-max 120 filter aci
注意:如果配置基于 ACI 的用户会话锁定时 PPPoE 属性中不存在 ACI 值,则路由器默认使用基于 MAC 的锁定。使用基于 ACI 的封装类型锁定,没有 ACI 属性的 PPPoE 客户端也会被锁定。