示例:通过聚合以太网链路配置组播负载平衡
此示例说明如何将点对多点 LSP 配置为跨聚合以太网链路的负载平衡。负载平衡适用于所有流量类型,包括组播。Junos OS 版本 11.1R2、11.2R2 和 11.4 支持使用 MPC 或 MIC 的 MX 系列路由器上通过聚合以太网子链路实现点对多点 LSP 组播负载平衡的功能奇偶校验。
VPLS 组播负载平衡需要 Junos OS 版本 14.1 或更高版本。
要求
开始之前:
-
配置路由器接口。
-
配置内部网关协议或静态路由。请参阅 用于路由设备的 Junos OS 路由协议库。
概述
此示例显示了用于执行以下任务的示例拓扑和配置:
-
通过链路聚合平衡 VPLS 组播流量的负载
-
通过链路聚合实现点对多点组播流量的负载平衡
-
下一跳跃拓扑结构更改后重新加载平衡
下一跳跃拓扑更改可能包括但不限于:
-
链路聚合中第 2 层成员资格变更
-
间接下一跳跃更改
-
复合下一跳跃更改
-
负载平衡基于散列,因此流量数量越高越好。与单播一样,您也可配置基于第 3 层和第 4 层信息的散列密钥,以实现更好的负载平衡结果。组播流量存在一些例外情况,可能会导致负载平衡不均 ,例如,当传出接口列表包含多个聚合接口且儿童链路数量不等时。
对于 Draft Rosen 组播 VPN (MVPN),当 LAG 都是核心接口时,聚合以太网接口上的负载平衡是参差不齐的。对于新一代 MBGP MPVN,组播信息流通过点对多点和 RSVP 发送,散列最多会计算到 IP 标头。在 Draft Rosen 案例中,组播流量通过 GRE 隧道进行隧道传输,哈希仅在 GRE 隧道标头上使用。这就是为什么当 LAG 都是核心接口时,负载平衡甚至不适用于 Draft Rosen。
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,然后将命令复制粘贴到层次结构级别的 [edit]
CLI 中。
设备 PE1
[edit] set forwarding-options hash-key family multiservice source-mac set forwarding-options hash-key family multiservice destination-mac set forwarding-options hash-key family multiservice payload ip layer-3 set interfaces ge-0/0/6 gigether-options 802.3ad ae0 set interfaces ge-0/1/6 gigether-options 802.3ad ae0 set interfaces ge-0/2/2 encapsulation ethernet-vpls set interfaces ge-0/2/2 unit 0 family vpls set interfaces ge-0/2/3 gigether-options 802.3ad ae0 set interfaces ge-0/2/6 gigether-options 802.3ad ae0 set interfaces ge-0/3/0 gigether-options 802.3ad ae0 set interfaces ge-0/3/1 gigether-options 802.3ad ae0 set interfaces ge-0/3/6 gigether-options 802.3ad ae0 set interfaces ge-1/0/6 gigether-options 802.3ad ae0 set interfaces ge-1/2/6 unit 0 family inet address 10.13.1.2/30 set interfaces ae0 unit 0 family inet address 10.11.11.1/30 set interfaces ae0 unit 0 family iso set interfaces ae0 unit 0 family mpls set policy-options policy-statement exp-to-fwd term a from community grn-com set policy-options policy-statement exp-to-fwd term a then install-nexthop lsp PE1-to-PE2 set policy-options policy-statement exp-to-fwd term a then accept set policy-options community grn-com members target:65000:1 set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols mpls label-switched-path PE1-to-PE2 to 10.255.19.77 set protocols mpls label-switched-path PE1-to-PE3 to 10.255.19.79 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group int type internal set protocols bgp group int local-address 10.255.71.214 set protocols bgp group int family inet any set protocols bgp group int family l2vpn signaling set protocols bgp group int neighbor 10.255.19.77 set protocols bgp group int neighbor 10.255.19.79 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set routing-instances vpls instance-type vpls set routing-instances vpls interface ge-0/2/2.0 set routing-instances vpls route-distinguisher 65000:1 set routing-instances vpls vrf-target target:65000:1 set routing-instances vpls protocols vpls site-range 3 set routing-instances vpls protocols vpls no-tunnel-services set routing-instances vpls protocols vpls site asia site-identifier 1 set routing-instances vpls protocols vpls site asia interface ge-0/2/2.0 set routing-instances vpls protocols vpls vpls-id 100 set routing-instances vpls protocols vpls bum-hashing
设备 PE2
set interfaces ge-0/0/7 gigether-options 802.3ad ae0 set interfaces ge-0/1/7 gigether-options 802.3ad ae0 set interfaces ge-0/2/3 gigether-options 802.3ad ae0 set interfaces ge-0/2/7 gigether-options 802.3ad ae0 set interfaces ge-2/0/0 gigether-options 802.3ad ae1 set interfaces ge-2/0/1 gigether-options 802.3ad ae1 set interfaces ge-2/0/2 gigether-options 802.3ad ae1 set interfaces ge-2/0/4 encapsulation ethernet-vpls set interfaces ge-2/0/4 unit 0 family vpls set interfaces ge-2/0/7 gigether-options 802.3ad ae0 set interfaces ge-2/0/9 unit 0 family inet address 10.10.1.1/30 set interfaces ge-2/0/9 unit 0 family mpls set interfaces ge-2/1/7 gigether-options 802.3ad ae0 set interfaces ge-2/2/7 gigether-options 802.3ad ae0 set interfaces ge-2/3/7 gigether-options 802.3ad ae0 set interfaces ae0 unit 0 family inet address 10.11.11.2/30 set interfaces ae0 unit 0 family iso set interfaces ae0 unit 0 family mpls set interfaces ae1 unit 0 family inet address 10.1.1.1/30 set interfaces ae1 unit 0 family mpls set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols mpls label-switched-path PE2-to-PE3 from 10.255.19.77 set protocols mpls label-switched-path PE2-to-PE3 to 10.255.19.79 set protocols mpls label-switched-path PE2-to-PE1 to 10.255.71.214 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group int type internal set protocols bgp group int local-address 10.255.19.77 set protocols bgp group int family inet any set protocols bgp group int family l2vpn signaling set protocols bgp group int neighbor 10.255.71.214 set protocols bgp group int neighbor 10.255.19.79 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface ge-2/0/0.0 set protocols ospf area 0.0.0.0 interface ge-2/0/1.0 set protocols ospf area 0.0.0.0 interface ge-2/0/2.0 set protocols ospf area 0.0.0.0 interface ae0.0 set protocols ospf area 0.0.0.0 interface ae1.0 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ldp interface all set protocols ldp interface fxp0.0 disable set routing-instances vpls instance-type vpls set routing-instances vpls interface ge-2/0/4.0 set routing-instances vpls route-distinguisher 65000:1 set routing-instances vpls vrf-target target:65000:1 set routing-instances vpls protocols vpls site-range 3 set routing-instances vpls protocols vpls no-tunnel-services set routing-instances vpls protocols vpls site 2 site-identifier 2 set routing-instances vpls protocols vpls site 2 interface ge-2/0/4.0 set routing-instances vpls protocols vpls vpls-id 100 set routing-instances vpls protocols vpls bum-hashing
逐步过程
要配置设备 PE1:
-
配置设备 PE1 接口。
[edit interfaces] user@PE1# set ge-0/0/6 gigether-options 802.3ad ae0 user@PE1# set ge-0/1/6 gigether-options 802.3ad ae0 user@PE1# set ge-0/2/2 encapsulation ethernet-vpls user@PE1# set ge-0/2/2 unit 0 family vpls user@PE1# set ge-0/2/3 gigether-options 802.3ad ae0 user@PE1# set ge-0/2/6 gigether-options 802.3ad ae0 user@PE1# set ge-0/3/0 gigether-options 802.3ad ae0 user@PE1# set ge-0/3/1 gigether-options 802.3ad ae0 user@PE1# set ge-0/3/6 gigether-options 802.3ad ae0 user@PE1# set ge-1/0/6 gigether-options 802.3ad ae0 user@PE1# set ge-1/2/6 unit 0 family inet address 10.1.1.2/30 user@PE1# set ae0 unit 0 family inet address 10.11.11.1/30 user@PE1# set ae0 unit 0 family iso user@PE1# set ae0 unit 0 family mpls
-
在设备 PE1 上,配置要用于按流负载平衡的数据包标头数据。
[edit forwarding-options hash-key family multiservice] user@PE1# set source-mac user@PE1# set destination-mac user@PE1# set payload ip layer-3
-
在设备 PE1 上配置路由策略。
[edit policy-options] user@PE1# set policy-statement exp-to-fwd term a from community grn-com user@PE1# set policy-statement exp-to-fwd term a then install-nexthop lsp PE1-to-PE2 user@PE1# set policy-statement exp-to-fwd term a then accept user@PE1# set policy-options community grn-com members target:65000:1
-
配置设备 PE1 路由协议和 MPLS。
[edit protocols] user@PE1# set rsvp interface all user@PE1# set rsvp interface fxp0.0 disable user@PE1# set mpls label-switched-path PE1-to-PE2 to 10.255.19.77 user@PE1# set mpls label-switched-path PE1-to-PE3 to 10.255.19.79 user@PE1# set mpls interface all user@PE1# set mpls interface fxp0.0 disable user@PE1# set bgp group int type internal user@PE1# set bgp group int local-address 10.255.71.214 user@PE1# set bgp group int family inet any user@PE1# set bgp group int family l2vpn signaling user@PE1# set bgp group int neighbor 10.255.19.77 user@PE1# set bgp group int neighbor 10.255.19.79 user@PE1# set ospf traffic-engineering user@PE1# set ospf area 0.0.0.0 interface all user@PE1# set ospf area 0.0.0.0 interface fxp0.0 disable
-
在设备 PE1 上配置 VPLS。
[edit routing-instances vpls] user@PE1# set instance-type vpls user@PE1# set interface ge-0/2/2.0 user@PE1# set route-distinguisher 65000:1 user@PE1# set vrf-target target:65000:1 user@PE1# set protocols vpls site-range 3 user@PE1# set protocols vpls no-tunnel-services user@PE1# set protocols vpls site asia site-identifier 1 user@PE1# set protocols vpls site asia interface ge-0/2/2.0 user@PE1# set protocols vpls vpls-id 100 user@PE1# set protocols vpls bum-hashing
逐步过程
要配置设备 PE2:
-
配置设备 PE2 接口。
[edit interfaces] user@PE2# set ge-0/0/7 gigether-options 802.3ad ae0 user@PE2# set ge-0/1/7 gigether-options 802.3ad ae0 user@PE2# set ge-0/2/3 gigether-options 802.3ad ae0 user@PE2# set ge-0/2/7 gigether-options 802.3ad ae0 user@PE2# set ge-2/0/0 gigether-options 802.3ad ae1 user@PE2# set ge-2/0/1 gigether-options 802.3ad ae1 user@PE2# set ge-2/0/2 gigether-options 802.3ad ae1 user@PE2# set ge-2/0/4 encapsulation ethernet-vpls user@PE2# set ge-2/0/4 unit 0 family vpls user@PE2# set ge-2/0/7 gigether-options 802.3ad ae0 user@PE2# set ge-2/0/9 unit 0 family inet address 10.10.1.1/30 user@PE2# set ge-2/0/9 unit 0 family mpls user@PE2# set ge-2/1/7 gigether-options 802.3ad ae0 user@PE2# set ge-2/2/7 gigether-options 802.3ad ae0 user@PE2# set ge-2/3/7 gigether-options 802.3ad ae0 user@PE2# set ae0 unit 0 family inet address 10.11.11.2/30 user@PE2# set ae0 unit 0 family iso user@PE2# set ae0 unit 0 family mpls user@PE2# set ae1 unit 0 family inet address 10.1.1.1/30 user@PE2# set ae1 unit 0 family mpls
-
配置设备 PE2 路由协议和 MPLS。
[edit protocols] user@PE2# set rsvp interface all user@PE2# set rsvp interface fxp0.0 disable user@PE2# set mpls label-switched-path PE2-to-PE3 from 10.255.19.77 user@PE2# set mpls label-switched-path PE2-to-PE3 to 10.255.19.79 user@PE2# set mpls label-switched-path PE2-to-PE1 to 10.255.71.214 user@PE2# set mpls interface all user@PE2# set mpls interface fxp0.0 disable user@PE2# set bgp group int type internal user@PE2# set bgp group int local-address 10.255.19.77 user@PE2# set bgp group int family inet any user@PE2# set bgp group int family l2vpn signaling user@PE2# set bgp group int neighbor 10.255.71.214 user@PE2# set bgp group int neighbor 10.255.19.79 user@PE2# set ospf traffic-engineering user@PE2# set ospf area 0.0.0.0 interface lo0.0 user@PE2# set ospf area 0.0.0.0 interface ge-2/0/0.0 user@PE2# set ospf area 0.0.0.0 interface ge-2/0/1.0 user@PE2# set ospf area 0.0.0.0 interface ge-2/0/2.0 user@PE2# set ospf area 0.0.0.0 interface ae0.0 user@PE2# set ospf area 0.0.0.0 interface ae1.0 user@PE2# set ospf area 0.0.0.0 interface all user@PE2# set ospf area 0.0.0.0 interface fxp0.0 disable user@PE2# set ldp interface all user@PE2# set ldp interface fxp0.0 disable
-
在设备 PE2 上配置 VPLS。
[edit routing-instances vpls] user@PE2# set instance-type vpls user@PE2# set interface ge-2/0/4.0 user@PE2# set route-distinguisher 65000:1 user@PE2# set vrf-target target:65000:1 user@PE2# set protocols vpls site-range 3 user@PE2# set protocols vpls no-tunnel-services user@PE2# set protocols vpls site 2 site-identifier 2 user@PE2# set protocols vpls site 2 interface ge-2/0/4.0 user@PE2# set protocols vpls vpls-id 100 user@PE2# set protocols vpls bum-hashing
结果
在配置模式下,发出 show forwarding-options
、 show interfaces
、 show protocols
和 show policy-options
show routing-options
命令来确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
设备 PE1
user@PE1# show forwarding-options hash-key { family multiservice { source-mac; destination-mac; payload { ip { layer-3; } } } }
user@PE1# show interfaces ge-0/0/6 { gigether-options { 802.3ad ae0; } } ge-0/1/6 { gigether-options { 802.3ad ae0; } } ge-0/2/2 { encapsulation ethernet-vpls; unit 0 { family vpls; } } ge-0/2/3 { gigether-options { 802.3ad ae0; } } ge-0/2/6 { gigether-options { 802.3ad ae0; } } ge-0/3/0 { gigether-options { 802.3ad ae0; } } ge-0/3/1 { gigether-options { 802.3ad ae0; } } ge-0/3/6 { gigether-options { 802.3ad ae0; } } ge-1/0/6 { gigether-options { 802.3ad ae0; } } ge-1/2/6 { unit 0 { family inet { address 10.1.1.2/30; } } } ae0 { unit 0 { family inet { address 10.11.11.1/30; } family iso; family mpls; } }
user@PE1# show protocols mpls { interface all; interface fxp0.0 { disable; } label-switched-path PE1-to-PE2 { to 10.255.19.77; } label-switched-path PE1-to-PE3 { to 10.255.19.79; } } rsvp { interface all; interface fxp0.0 { disable; } } bgp { group int { type internal; local-address 10.255.71.214; family inet { any; } family l2vpn { signaling; } neighbor 10.255.19.77; neighbor 10.255.19.79; } } ospf { traffic-engineering; area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } }
user@PE1# show policy-options policy-statement exp-to-fwd { term a { from community grn-com; then { install-nexthop lsp PE1-to-PE2; accept; } } } community grn-com members target:65000:1;
user@PE1# show routing-instances vpls { instance-type vpls; interface ge-0/2/2.0; route-distinguisher 65000:1; vrf-target target:65000:1; protocols { vpls { site-range 3; no-tunnel-services; site asia { site-identifier 1; interface ge-0/2/2.0; } vpls-id 100; bum-hashing; } } }
设备 PE2
user@PE2# show interfaces ge-0/0/7 { gigether-options { 802.3ad ae0; } } ge-0/1/7 { gigether-options { 802.3ad ae0; } } ge-0/2/3 { gigether-options { 802.3ad ae0; } } ge-0/2/7 { gigether-options { 802.3ad ae0; } } ge-2/0/0 { gigether-options { 802.3ad ae1; } } ge-2/0/1 { gigether-options { 802.3ad ae1; } } ge-2/0/2 { gigether-options { 802.3ad ae1; } } ge-2/0/4 { encapsulation ethernet-vpls; unit 0 { family vpls; } } ge-2/0/7 { gigether-options { 802.3ad ae0; } } ge-2/0/9 { unit 0 { family inet { address 10.10.1.1/30; } family mpls; } } ge-2/1/7 { gigether-options { 802.3ad ae0; } } ge-2/2/7 { gigether-options { 802.3ad ae0; } } ge-2/3/7 { gigether-options { 802.3ad ae0; } } ae0 { unit 0 { family inet { address 10.11.11.2/30; } family iso; family mpls; } } ae1 { unit 0 { family inet { address 10.1.1.1/30; } family mpls; } }
user@PE2# show protocols rsvp { interface all; interface fxp0.0 { disable; } } mpls { label-switched-path PE2-to-PE3 { from 10.255.19.77; to 10.255.19.79; } label-switched-path PE2-to-PE1 { to 10.255.71.214; } interface all; interface fxp0.0 { disable; } } bgp { group int { type internal; local-address 10.255.19.77; family inet { any; } family l2vpn { signaling; } neighbor 10.255.71.214; neighbor 10.255.19.79; } } ospf { traffic-engineering; area 0.0.0.0 { interface lo0.0; interface ge-2/0/0.0; interface ge-2/0/1.0; interface ge-2/0/2.0; interface ae0.0; interface ae1.0; interface all; interface fxp0.0 { disable; } } } ldp { interface all; interface fxp0.0 { disable; } }
user@PE2# show routing-instances vpls { instance-type vpls; interface ge-2/0/4.0; route-distinguisher 65000:1; vrf-target target:65000:1; protocols { vpls { site-range 3; no-tunnel-services; site 2 { site-identifier 2; interface ge-2/0/4.0; } vpls-id 100; bum-hashing; } } }
验证
您可通过运行 show interfaces ae1.0 extensive
和 monitor interface traffic
命令来监控路由实例的操作。
要进行故障排除,您可以为所有协议配置跟踪操作。