示例:通过聚合以太网在静态底层 VLAN 多路分离接口上配置静态 PPPoE 用户接口
此示例说明了如何通过聚合以太网捆绑包配置静态 PPPoE 用户接口,以提供用户链路冗余。
要求
通过聚合以太网的 VLAN 多路分离接口的 PPPoE 需要以下硬件和软件:
MX 系列 5G 通用路由平台
MPC
Junos OS 11.2 或更高版本
在配置此功能之前,不需要除设备初始化之外的特殊配置。
概述
聚合以太网捆绑包可在通过以太网链路连接的路由器与网络设备之间实现链路冗余。此示例介绍如何通过聚合以太网接口与中间静态 VLAN 多路分离接口为静态 PPPoE 用户配置链路冗余。示例任务包括配置双成员聚合以太网捆绑包ae0,配置作为 PPPoE 用户接口pp0.100基础的静态 VLAN 多路分离接口demux0.100,以及配置 PPPoE 用户接口(包括 PPPoE 家族的特性)。
此示例未显示所有可能的配置选项。
配置
过程
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 edit interfaces demux0 unit 100 set vlan-id 100 set demux-options underlying-interface ae0 set family pppoe access-concentrator pppoe-server-1 set family pppoe duplicate-protection set family pppoe max-sessions 16000 top edit interfaces pp0 unit 100 set pppoe-options underlying-interface demux0.100 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 demxu0 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 max-sessions 16000
将 VLAN 多路分离接口配置为在其上创建 PPPoE 逻辑接口的底层接口。
[edit interfaces] user@host# set pp0 unit 100 pppoe-options underlying-interface demux0.100 user@host# set pp0 unit 100 pppoe-options server user@host# set pp0 unit 100 family inet unnumbered-address lo0.0
结果
在配置模式下,输入 show chassis 命令以确认聚合设备配置。输入命令以 show interfaces 确认接口配置。如果输出未显示预期的配置,请重复此示例中的配置说明进行更正。
[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;
max-sessions 16000;
}
}
}
pp0 {
unit 100 {
pppoe-options {
underlying-interface demux0.100;
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: none,
Service Name Table: None,
Max Sessions: 16000, Duplicate Protection: On,
AC Name: pppoe-server-1
或者,也可以进入 以 show pppoe underlying-interfaces detail 显示所有已配置底层接口的状态和 PPPoE 家族配置。
意义
输出显示底层接口的名称、聚合捆绑包的成员链路以及 PPPoE 家族配置。当逻辑接口上存在流量时,输出显示数据包计数。
验证 pp0 接口配置
目的
验证接口值是否与您的配置匹配。
行动
在作模式下,输入命令 show interfaces pp0 。
user@host> show interfaces pp0.100
Logical interface pp0.100 (Index 71) (SNMP ifIndex 710)
Flags: Point-To-Point SNMP-Traps 0x4000 Encapsulation: PPPoE
PPPoE:
State: SessionUp, Session ID: 1,
Session AC name: pppoe-server-1, Remote MAC address: 00:00:5e:00:53:34,
Underlying interface: demux0.100 (Index 70)
Link:
ge-5/0/3.32767
ge-5/1/2.32767
Input packets : 18572
Output packets: 18572
Keepalive settings: Interval 10 seconds, Up-count 1, Down-count 3
Keepalive: Input: 0 (never), Output: 18566 (00:00:02 ago)
LCP state: Opened
NCP state: inet: Opened, inet6: Not-configured, iso: Not-configured, mpls:
Not-configured
CHAP state: Closed
PAP state: Success
Protocol inet, MTU: 1500
Flags: Sendbcast-pkt-to-re
Addresses, Flags: Is-Primary
Local: 45.63.24.1
意义
此输出显示有关在底层 VLAN 多路分离接口上创建的 PPPoE 逻辑接口的信息。输出包括 PPPoE 系列和聚合以太网冗余链路信息,并显示 PPPoE 接口的输入和输出流量。