示例:通过聚合以太网在静态底层 VLAN 多路分离接口上配置动态 PPPoE 用户接口
此示例说明如何通过聚合以太网捆绑包配置动态 PPPoE 用户接口,以提供用户链路冗余。
要求
通过聚合以太网的 VLAN 多路分离接口的 PPPoE 需要以下硬件和软件:
MX 系列 5G 通用路由平台
MPC
Junos OS 11.2 或更高版本
在配置此功能之前,不需要除设备初始化之外的特殊配置。
概述
聚合以太网捆绑包可在通过以太网链路连接的路由器与网络设备之间实现链路冗余。此示例介绍如何通过聚合以太网接口 ae0为动态 PPPoE 用户配置链路冗余,并使用中间静态 VLAN 多路分离接口 demux0.100。示例任务包括配置双成员聚合以太网捆绑包、配置作为 PPPoE 用户接口基础的静态 VLAN 多路分离接口,以及配置用于建立动态 PPPoE 用户接口的动态配置文件。
动态 PPPoE 配置文件 (pppoe-profile) 可创建 PPPoE 用户接口。它还可将路由器配置为 PPPoE 服务器,并使本地地址能够从指定地址派生,而无需向接口分配显式 IP 地址。 pppoe-profile 动态配置文件被分配给静态中间 VLAN 多路分离接口 (demux0.100),该接口配置了 PPPoE 家族 (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 输出显示聚合以太网接口已开启,并且正在逻辑接口上接收流量。
验证 demux0 接口配置
目的
验证 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 家族配置。当逻辑接口上存在流量时,输出显示数据包计数。