示例:在静态底层 VLAN 多路分解接口上通过聚合以太网配置动态 PPPoE 用户接口
此示例说明如何通过聚合以太网捆绑包配置动态 PPPoE 用户接口以提供订阅者链路冗余。
要求
基于聚合以太网的 VLAN 多路复用接口的 PPPoE 需要以下硬件和软件:
MX 系列 5G 通用路由平台
MPC
Junos OS 11.2 或更高版本
配置此功能之前,不需要除设备初始化之外的特殊配置。
概述
聚合以太网捆绑包支持路由器与通过以太网链路连接的网络设备之间的链路冗余。此示例介绍如何通过聚合以太网接口使用中间静态 VLAN 多路复用demux0.100
接口ae0
为动态 PPPoE 订阅者的链路冗余。示例任务包括配置双成员聚合以太网捆绑包,配置作为 PPPoE 用户接口基础的静态 VLAN 多路复用接口,以及配置用于建立动态 PPPoE 用户接口的动态配置文件。
动态 PPPoE 配置文件 (pppoe-profile
) 创建 PPPoE 用户接口。它还会将路由器配置为充当 PPPoE 服务器,并使本地地址能够从指定地址派生,而无需为接口分配显式 IP 地址。动态 pppoe-profile
配置文件被分配给使用 PPPoE 系列 (demux0.100
) 属性配置的静态、中间 VLAN 多路复用接口 (family pppoe
)。此动态配置文件包含以下预定义变量:
$junos-interface-unit
-表示动态 PPPoE 逻辑接口的逻辑单元号。此预定义变量将动态替换为订阅者登录时路由器提供的单元号。$junos-underlying-interface
-表示底层以太网接口的名称。当订阅者登录时,此预定义变量将被路由器提供的接口名称动态取代。
此示例未显示所有可能的配置选择。
配置
程序
CLI 快速配置
要通过聚合以太网的静态 VLAN 多路复用接口为动态 PPPoE 订阅者快速配置链路冗余,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,然后将命令复制并粘贴到 CLI 中。
[edit] set chassis aggregated-devices ethernet device-count 1 set interfaces ge-5/0/3 gigether-options 802.3ad ae0 set interfaces ge-5/0/3 gigether-options 802.3ad primary set interfaces ge-5/1/2 gigether-options 802.3ad ae0 set interfaces ge-5/1/2 gigether-options 802.3ad backup set interfaces ae0 flexible-vlan-tagging set interfaces ae0 aggregated-ether-options link-protection set interfaces demux0 unit 100 vlan-id 100 set interfaces demux0 unit 100 demux-options underlying-interface ae0 set interfaces demux0 unit 100 family pppoe access-concentrator pppoe-server-1 set interfaces demux0 unit 100 family pppoe duplicate-protection set interfaces demux0 unit 100 family pppoe dynamic-profile pppoe-profile edit dynamic-profiles pppoe-profile edit interfaces pp0 unit $junos-interface-unit set pppoe-options underlying-interface $junos-underlying-interface set pppoe-options server set family inet unnumbered-address lo0.0 top
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 在配置模式下使用 CLI 编辑器。
要通过聚合以太网上的静态 VLAN 多路复用接口为动态 PPPoE 订阅者的链路冗余配置:
定义路由器上的聚合以太网设备数量。
[edit chassis] user@host# set aggregated-devices ethernet device-count 1
配置双链路聚合以太网逻辑接口,用作静态 VLAN 多路分离用户接口的底层接口。在此示例中,LAG 束配置为一对一主动/备份链路冗余。为了在 MPC 级别支持链路冗余,LAG 捆绑包连接到两个不同 MPC 的端口。
[edit interfaces] user@host# set ge-5/0/3 gigether-options 802.3ad ae0 user@host# set ge-5/0/3 gigether-options 802.3ad primary user@host# set ge-5/1/2 gigether-options 802.3ad ae0 user@host# set ge-5/1/2 gigether-options 802.3ad backup
在聚合以太网逻辑接口上启用链路保护,并配置对单(双)(堆叠)VLAN 标记的支持。
[edit interfaces] user@host# set ae0 aggregated-ether-options link-protection user@host# set ae0 flexible-vlan-tagging
通过聚合以太网逻辑接口配置 VLAN 多路分离接口。
[edit interfaces] user@host# set demux0 unit 100 vlan-id 100 user@host# set demux0 unit 100 demux-options underlying-interface ae0
配置 VLAN 多路接口上的 PPPoE 系列属性,包括动态配置文件。
[edit interfaces] user@host# set demux0 unit 100 family pppoe access-concentrator pppoe-server-1 user@host# set demux0 unit 100 family pppoe duplicate-protection user@host# set demux0 unit 100 family pppoe dynamic-profile pppoe-profile
配置用于创建 PPPoE 用户接口的动态配置文件。
[edit dynamic-profiles pppoe-profile] user@host# edit interfaces pp0 unit $junos-interface-unit [edit dynamic-profiles pppoe-profile interfaces pp0 unit "$junos-interface-unit"] user@host# set pppoe-options underlying-interface $junos-underlying-interface user@host# set pppoe-options server user@host# set family inet unnumbered-address lo0.0
结果
在配置模式下,输入 show chassis
命令以确认聚合设备配置。输入 show interfaces
命令,确认接口配置。输入 show dynamic-profiles
命令,确认动态配置文件配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
[edit] user@host# show chassis aggregated-devices { ethernet { device-count 1; } }
[edit] user@host# show interfaces ge-5/0/3 { gigether-options { 802.3ad { ae0; primary; } } } ge-5/1/2 { gigether-options { 802.3ad { ae0; backup; } } } ae0 { flexible-vlan-tagging; aggregated-ether-options { link-protection; } } demux0 { unit 100 { vlan-id 100; demux-options { underlying-interface ae0; } family pppoe { access-concentrator pppoe-server-1 duplicate-protection; dynamic-profile pppoe-profile; } } }
[edit] user@host# show dynamic-profiles pppoe-profile { interfaces { pp0 { unit $junos-interface-unit { pppoe-options { underlying-interface $junos-underlying-interface; server; } family inet { unnumbered-address lo0.0; } } } } }
完成设备配置后,请从配置模式进入 commit
。
验证
要确认配置工作正常,请执行以下任务:
验证聚合以太网接口配置
目的
验证接口值与您的配置匹配、链路是否开启以及流量是否流动。
行动
在操作模式下,输入 show interfaces redundancy
命令。
user@host> show interfaces redundancy Interface State Last change Primary Secondary Current status ae0 On primary ge-5/0/3 ge-5/1/2 both up
在操作模式下,输入 show interfaces ae0
命令。
user@host> show interfaces ae0 Physical interface: ae0, Enabled, Physical link is Up Interface index: 128, SNMP ifIndex: 606 Link-level type: Ethernet, MTU: 1522, Speed: 1Gbps, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Disabled, Minimum links needed: 1, Minimum bandwidth needed: 0 Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 Current address: 00:00:5e:00:53:d0, Hardware address: 00:00:5e:00:53:d0 Last flapped : 2011-03-11 13:24:18 PST (2d 03:34 ago) Input rate : 1984 bps (2 pps) Output rate : 0 bps (0 pps) Logical interface ae0.32767 (Index 69) (SNMP ifIndex 709) Flags: SNMP-Traps 0x4004000 VLAN-Tag [ 0x0000.0 ] Encapsulation: ENET2 Statistics Packets pps Bytes bps Bundle: Input : 371259 2 46036116 1984 Output: 0 0 0 0 Protocol multiservice, MTU: Unlimited Flags: Is-Primary
意义
show interfaces redundancy
输出显示冗余链路配置,并且两个链路接口均已启动。show interfaces ae0
输出显示聚合以太网接口已启动,且正在逻辑接口上接收该流量。
验证多路复用接口配置
目的
验证 VLAN 多路复用接口是否显示聚合以太网捆绑包中配置的 PPPoE 系列属性和成员链路。
行动
在操作模式下,输入 show interfaces demux0
命令。
user@host> show interfaces demux0.100 Logical interface demux0.100 (Index 76) (SNMP ifIndex 61160) Flags: SNMP-Traps 0x4000 VLAN-Tag [ 0x8100.100 ] Encapsulation: ENET2 Demux: Underlying interface: ae0 (Index 199) Link: ge-5/0/3 ge-5/1/2 Input packets : 2 Output packets: 18575 Protocol pppoe Dynamic Profile: pppoe-profile, Service Name Table: None, Max Sessions: 16000, Duplicate Protection: On, AC Name: pppoe-server-1
或者,您也可以输入 show pppoe underlying-interfaces detail
来显示所有配置的底层接口的状态和 PPPoE 系列配置。输出还提供有关每个 VLAN 的 PPPoE 协商的信息。
意义
输出显示底层接口的名称、聚合捆绑包的成员链路以及 PPPoE 系列配置。当逻辑接口上存在流量时,输出显示数据包计数。