具有冗余虚拟隧道的组播 L3 VPN 的弹性配置
冗余虚拟隧道在传输组播流量时提供弹性概述
在组播第 3 层 VPN 中,需要虚拟隧道 (VT) 接口来促进基于 MPLS 标签的虚拟路由和转发 (VRF) 表查找。
Junos OS 在数据包转发引擎级别支持 冗余 VT ,以提高传输组播流量的弹性。
冗余 VT 仅在具有 MPC 的 MX 系列路由器上受支持。
要在数据包转发引擎级别创建冗余 VT,请将成员 VT(vt 接口)添加到父 VT(RVT 接口)。
在带有 MPC 的 MX 系列路由器上配置冗余 VT 接口具有以下特征:
创建冗余 VT 时,您可以将未配置的 VT 添加为冗余 VT 的成员。配置冗余 VT 的方式与配置常规 VT 的方式相同,成员 VT 继承父冗余 VT 的配置。
当具有现有配置的 VT 加入冗余 VT 时,您必须使用现有配置中的设置配置冗余 VT。
您最多可以创建 16 个冗余 VT。
您最多可以添加 32 个 VT 作为冗余 VT 的成员。
注意:您可以创建的实际 VT 数量取决于机箱类型和您拥有的线卡数量。
当您将两个以上的 VT 添加到冗余 VT 时,成员默认处于活动模式,并且通过冗余 VT 的流量会在冗余 VT 的所有成员之间均衡负载。
如果仅添加两个成员,则可以通过以下两种方式之一配置成员:
两个成员都处于活动模式
一个成员处于活动模式,另一个成员处于备份模式
最佳实践:若要将一个成员设置为活动模式,将另一个成员设置为备份模式,建议将成员托管在不同的 MPC 上。这样,如果 MPC 发生故障,它不会导致整个 RVT 接口瘫痪。
涉及 VT 接口的服务等级和防火墙配置在冗余 VT 接口上的工作方式相同。
冗余 VT 有助于在传输组播流量时提供弹性并延长网络的正常运行时间。在[edit chassis network-services]
层次结构级别启用时enhanced-ip
,通常可以检测到作为冗余 VT 成员的 VT 的故障,并在 50 毫秒内将故障转移到提供的另一个成员 VT。
配置冗余虚拟隧道,以在传输组播流量时提供弹性
在组播第 3 层 VPN 中,需要虚拟隧道 (VT) 接口来促进基于 MPLS 标签的虚拟路由和转发 (VRF) 表查找。
Junos OS 在数据包转发引擎级别支持 冗余 VT ,以提高传输组播流量的弹性。
冗余 VT 仅在具有 MPC 的 MX 系列路由器上受支持。
要在数据包转发引擎级别创建冗余 VT,请将成员 VT(vt- 接口)添加到冗余 VT(RVT 接口),然后将该冗余 VT 接口添加到 VRF 路由实例。
要配置冗余 VT,请执行以下作:
另见
示例:配置冗余虚拟隧道,在传输组播流量时提供弹性
此示例说明如何在多协议 BGP (MBGP) 组播 VPN (MVPN) 中配置冗余虚拟隧道 (VT)。您可以配置虚拟环路隧道,以便基于 MPLS 标签进行虚拟路由和转发 (VRF) 表查找。如果其中一个 VT 发生故障,通过此方法配置的冗余 VT 可提供近乎即时(小于 50 毫秒)的故障切换。
要求
此示例使用以下硬件和软件组件:
-
MX 系列路由器上的 MPC
-
Junos OS 15.2 版
概述
当具有现有配置的 VT 加入冗余 VT 时,您必须使用现有配置中的设置配置冗余 VT。
您可以将成员 VT 添加到父 VT 以实现冗余。
在配备 MPC 的 MX 系列路由器上,您可以通过以下方式配置冗余 VT:
-
您最多可以创建 16 个冗余 VT。
-
您最多可以添加 32 个 VT 作为冗余 VT 的成员。
注意:您可以创建的实际 VT 数量取决于机箱类型和您拥有的线卡数量。
-
将两个以上的 VT 添加到冗余 VT 时,默认情况下,成员处于活动模式。
-
如果仅添加两个成员,可以通过以下方式之一配置成员:
-
两个成员都处于活动模式
-
一个成员处于活动模式,另一个成员处于备份模式
-
配置
设备 P
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description “to PE1” set interfaces ge-0/0/0 unit 0 family inet address 192.0.2.6/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description “to PE2” set interfaces ge-0/0/1 unit 0 family inet address 192.0.2.9/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description “to PE3” set interfaces ge-0/0/2 unit 0 family inet address 192.0.2.22/24 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 198.51.100.3/24 set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp local-address 198.51.100.3 set protocols bgp family inet-vpn unicast set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 198.51.100.3 set protocols bgp group ibgp family inet any set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp cluster 198.51.100.3 set protocols bgp group ibgp neighbor 198.51.100.2 set protocols bgp group ibgp neighbor 198.51.100.4 set protocols bgp group ibgp neighbor 198.51.100.6 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive 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 protocols pim interface all set protocols pim interface fxp0.0 disable set routing-options router-id 198.51.100.3 set routing-options autonomous-system 10
设备 PE2
set chassis redundancy-group interface-type redundant-virtual-tunnel device-count 16 set chassis fpc 1 pic 0 tunnel-services bandwidth 1g set chassis fpc 2 pic 0 tunnel-services bandwidth 1g set chassis network-services enhanced-ip set interfaces ge-0/0/0 description “to P” set interfaces ge-0/0/0 unit 0 family inet address 192.0.2.10/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description “to CE2” set interfaces ge-0/0/1 unit 0 family inet address 192.0.2.13/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 198.51.100.4/24 set interfaces rvt0 redundancy-group member-interface vt-1/0/10 active set interfaces rvt0 redundancy-group member-interface vt-2/0/10 backup set interfaces rvt0 unit 1000 family inet set interfaces rvt0 unit 1000 family mpls set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface fxp0.0 disable set protocols mpls label-switched-path PE2-to-PE1 to 198.51.100.2 set protocols mpls label-switched-path PE2-to-PE3 to 198.51.100.6 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface fxp0.0 disable set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 198.51.100.4 set protocols bgp group ibgp family inet any set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 198.51.100.3 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 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 protocols pim interface all set protocols pim interface fxp0.0 disable set policy-options policy-statement direct from protocol direct set policy-options policy-statement direct then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface ge-0/0/1.0 set routing-instances vpn-1 interface lo0.1 set routing-instances vpn-1 interface rvt0.1000 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 routing-options multipath set routing-instances vpn-1 protocols bgp group CE2-PE2 type external set routing-instances vpn-1 protocols bgp group CE2-PE2 export direct set routing-instances vpn-1 protocols bgp group CE2-PE2 peer-as 100 set routing-instances vpn-1 protocols bgp group CE2-PE2 neighbor 192.0.2.14 family inet unicast set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface all set routing-instances vpn-1 protocols pim rp static address 192.168.0.0 set routing-instances vpn-1 protocols pim interface all mode sparse set routing-instances vpn-1 protocols mvpn mvpn-mode spt-only set routing-instances vpn-1 protocols mvpn sender-based-rpf set routing-instances vpn-1 protocols mvpn hot-root-standby source-tree set routing-options router-id 198.51.100.4 set routing-options autonomous-system 10
设备 CE2
set interfaces ge-0/0/0 description “upstream to PE2” set interfaces ge-0/0/0 unit 0 family inet address 192.0.2.14/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description “Source-facing interface” set interfaces ge-0/0/1 unit 0 family inet address 203.0.113.2/24 set interfaces lo0 unit 0 family inet address 198.51.100.5/24 set protocols bgp group CE-to-PE type external set protocols bgp group CE-to-PE export direct set protocols bgp group CE-to-PE peer-as 10 set protocols bgp group CE-to-PE local-as 100 set protocols bgp group CE-to-PE neighbor 192.0.2.13 family inet unicast set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols pim rp static address 192.168.0.0 set protocols pim interface all set policy-options policy-statement direct from protocol direct set policy-options policy-statement direct then accept set routing-options router-id 198.51.100.5 set routing-options nonstop-routing set routing-options autonomous-system 100
程序
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
在本节中,RVT 接口配置在设备 PE2 上。
-
在机箱上配置冗余虚拟隧道冗余组和隧道服务。
[edit chassis] user@PE2# set redundancy-group interface-type redundant-virtual-tunnel device-count 16 user@PE2# set fpc 1 pic 0 tunnel-services bandwidth 1g user@PE2# set fpc 2 pic 0 tunnel-services bandwidth 1g user@PE2# set network-services enhanced-ip
-
配置物理接口和环路接口。
[edit interfaces] user@PE2# set ge-0/0/0 description “to P” user@PE2# set ge-0/0/0 unit 0 family inet address 192.0.2.10/24 user@PE2# set ge-0/0/0 unit 0 family mpls user@PE2# set ge-0/0/1 description “to CE2” user@PE2# set ge-0/0/1 unit 0 family inet address 192.0.2.13/24 user@PE2# set ge-0/0/1 unit 0 family mpls user@PE2# set lo0 unit 0 family inet address 198.51.100.4/24
-
配置 rvt 接口。
注意:在此示例中,RVT 接口的一个成员设置为活动,另一个接口设置为备份。此方法要求成员接口位于单独的 MPC 上。
[edit interfaces] user@PE2# set rvt0 redundancy-group member-interface vt-1/0/10 active user@PE2# set rvt0 redundancy-group member-interface vt-2/0/10 backup user@PE2# set rvt0 unit 1000 family inet user@PE2# set rvt0 unit 1000 family mpls
-
配置 MPLS。
[edit protocols mpls] user@PE2# set label-switched-path PE2-to-PE1 to 198.51.100.2 user@PE2# set label-switched-path PE2-to-PE3 to 198.51.100.6 user@PE2# set interface ge-0/0/0.0 user@PE2# set interface fxp0.0 disable
-
配置 BGP。
[edit protocols bgp] user@PE2# set group ibgp type internal user@PE2# set group ibgp local-address 198.51.100.4 user@PE2# set group ibgp family inet any user@PE2# set group ibgp family inet-vpn any user@PE2# set group ibgp family inet-mvpn signaling user@PE2# set group ibgp neighbor 198.51.100.3
-
配置内部网关协议。
[edit protocols ospf] user@PE2# set traffic-engineering user@PE2# set area 0.0.0.0 interface lo0.0 passive user@PE2# set area 0.0.0.0 interface ge-0/0/0.0 user@PE2# set area 0.0.0.0 interface fxp0.0 disable
-
配置 LDP、PIM 和 RSVP。
[edit protocols] user@PE2# set ldp interface all user@PE2# set ldp interface fxp0.0 disable user@PE2# set pim interface all user@PE2# set pim interface fxp0.0 disable user@PE2# set rsvp interface ge-0/0/0.0 user@PE2# set rsvp interface fxp0.0 disable
-
配置路由策略。
[edit policy-options policy-statement direct] user@PE2# set from protocol direct user@PE2# set then accept
-
配置路由实例。
[edit routing-instances vpn-1] user@PE2# set instance-type vrf user@PE2# set interface ge-0/0/1.0 user@PE2# set interface lo0.1 user@PE2# set route-distinguisher 100:100 user@PE2# set vrf-target target:1:1 user@PE2# set routing-options multipath user@PE2# set protocols bgp group CE2-PE2 type external user@PE2# set protocols bgp group CE2-PE2 export direct user@PE2# set protocols bgp group CE2-PE2 peer-as 100 user@PE2# set protocols bgp group CE2-PE2 neighbor 192.0.2.14 family inet unicast user@PE2# set protocols ospf area 0.0.0.0 interface all user@PE2# set protocols pim rp static address 192.168.0.0 user@PE2# set protocols pim interface all mode sparse user@PE2# set protocols mvpn mvpn-mode spt-only user@PE2# set protocols mvpn sender-based-rpf user@PE2# set protocols mvpn hot-root-standby source-tree
-
将 rvt 接口添加到路由实例。
[edit routing-instances vpn-1] user@PE2# set interface rvt0.1000
-
配置路由器 ID 和自治系统 (AS) 编号。
[edit routing-options] user@PE2# set router-id 198.51.100.4 user@PE2# set autonomous-system 10
结果
在配置模式下,输入show chassis、show interfaces、show routing-instancesshow protocolsshow policy-options和show routing-options命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
user@PE2# show chassis redundancy-group { interface-type { redundant-virtual-tunnel { device-count 16; } } } fpc 1 { pic 0 { tunnel-services { bandwidth 1g; } } } fpc 2 { pic 0 { tunnel-services { bandwidth 1g; } } } network-services { enhanced-ip; } user@PE2# show interfaces ge-0/0/0 { description "to P"; unit 0 { family inet { address 192.0.2.10/24; } family mpls; } } ge-0/0/1 { description "to CE2"; unit 0 { family inet { address 192.0.2.13/24; } family mpls; } } lo0 { unit 0 { family inet { address 198.51.100.4/24; } } } rvt0 { redundancy-group { member-interface vt-1/0/10 { active; } member-interface vt-2/0/10 { backup; } } unit 1000 { family inet; family mpls; } } user@PE2# show protocols mpls { label-switched-path PE2-to-PE1 { to 198.51.100.2; } label-switched-path PE2-to-PE3 { to 198.51.100.6; } interface fxp0.0 { disable; } interface ge-0/0/0.0; } bgp { group ibgp { type internal; local-address 198.51.100.4; family inet { any; } family inet-vpn { any; } family inet-mvpn { signaling; } neighbor 198.51.100.3; } } ospf { traffic-engineering; area 0.0.0.0 { interface fxp0.0 { disable; } interface lo0.0 { passive; } interface ge-0/0/0.0; } } ldp { interface all; interface fxp0.0 { disable; } } pim { interface all; interface fxp0.0 { disable; } } rsvp { interface fxp0.0 { disable; } interface ge-0/0/0.0; } user@PE2# show policy-options policy-statement direct { from protocol direct; then accept; } user@PE2# show routing-instances vpn-1 { instance-type vrf; interface ge-0/0/1.0; interface lo0.1; interface rvt0.1000; route-distinguisher 100:100; vrf-target target:1:1; routing-options { multipath; } protocols { bgp { group CE2-PE2 { type external; export direct; peer-as 100; neighbor 192.0.2.14 { family inet { unicast; } } } } ospf { area 0.0.0.0 { interface all; } } pim { rp { static { address 192.168.0.0; } } interface all { mode sparse; } } mvpn { mvpn-mode { spt-only; } sender-based-rpf; hot-root-standby { source-tree; } } } } user@PE2# show routing-options router-id 198.51.100.4; autonomous-system 10;
如果完成设备配置,请从配置模式输入 commit 。
验证
确认配置工作正常。
验证虚拟隧道和冗余虚拟隧道接口的创建
目的
验证是否已创建 rvt 接口,以及 rvt 接口中是否包含相应的成员 vt- 接口。
行动
在作模式下,输入 show interfaces terse | match rvt0 命令。
user@PE2# show interfaces terse | match rvt0 user@host# run show interfaces terse | match rvt0 vt-1/0/10.1000 up up container--> rvt0.1000 vt-2/0/10.1000 up up container--> rvt0.1000 rvt0 up up rvt0.1000 up up inet
意义
输出显示已 rvt0 创建,并且包含 vt-1/0/10 和 vt-2/0/10 作为成员接口。
验证 RVT 接口是否包含在组播路由中
目的
验证 vpn1 组播路由实例是否正在运行,以及它是否包含 rvt0 接口。
行动
在作模式下,输入 show multicast route extensive instance vpn1 命令。
user@PE2# show multicast route extensive instance vpn1 Instance: vpn1 Family: INET Group: 203.0.113.3 Source: 10.0.0.2/24 Upstream rpf interface list: rvt0.1000 (P) Sender Id: Label 299888 Downstream interface list: ge-1/0/5.0 Number of outgoing interfaces: 1 Session description: Unknown Statistics: 460 kBps, 10000 pps, 4387087 packets RPF Next-hop ID: 941 Next-hop ID: 1048594 Upstream protocol: MVPN Route state: Active Forwarding state: Forwarding Cache lifetime/timeout: forever Wrong incoming interface notifications: 0 Uptime: 00:07:48
意义
输出显示 vpn1 路由实例正在运行,并包含 rvt0。
验证通过 RVT 接口及其成员接口的流量
目的
验证流量是否按预期通过 rvt0 接口及其成员接口。对于此部分,启动从源到接收方的单播和组播流量流。
在此示例中,通过接口 rvt0 的所有流量都应通过活动 vt-1/0/10 接口,并且没有流量应通过备份 vt-2/0/10 接口。
行动
在作模式下,输入 monitor interface rvt0 命令。
user@PE2# monitor interface rvt0 Interface: rvt0, Enabled, Link is Up Encapsulation: VPN-Loopback-tunnel, Speed: 2000mbps Traffic statistics: Current delta Input bytes: 2788575982 (14720096 bps) [10976152] Output bytes: 0 (0 bps) [0] Input packets: 60621217 (40000 pps) [238612] Output packets: 0 (0 pps) [0] Error statistics: Input errors: 0 [0] Input drops: 0 [0] Input framing errors: 0 [0] Carrier transitions: 0 [0] Output errors: 0 [0] Output drops: 0 [0]
从此输出, rvt0 已启用并启动,并且流量正在流经它。
现在输入 monitor interface vt-1/0/10 命令。
user@PE2# monitor interface vt-1/0/10 Interface: vt-1/0/10, Enabled, Link is Up Encapsulation: VPN-Loopback-tunnel, Speed: 1000mbps Traffic statistics: Current delta Input bytes: 2997120202 (14720096 bps) [3658702] Output bytes: 0 (0 bps) [0] Input packets: 65154787 (40000 pps) [79537] Output packets: 0 (0 pps) [0] Error statistics: Input errors: 0 [0] Input drops: 0 [0] Input framing errors: 0 [0] Carrier transitions: 0 [0] Output errors: 0 [0] Output drops: 0 [0]
从此输出中,通过 rvt0 接口的所有流量都将通过活动 vt-1/0/10 接口,正如预期的那样。
现在输入 monitor interface vt-2/0/10 命令。
user@PE2# monitor interface vt-2/0/10 Interface: vt-2/0/10, Enabled, Link is Up Encapsulation: VPN-Loopback-tunnel, Speed: 1000mbps Traffic statistics: Current delta Input bytes: 0 (0 bps) [0] Output bytes: 0 (0 bps) [0] Input packets: 0 (0 pps) [0] Output packets: 0 (0 pps) [0] Error statistics: Input errors: 0 [0] Input drops: 0 [0] Input framing errors: 0 [0] Carrier transitions: 0 [0] Output errors: 0 [0] Output drops: 0 [0]
在此输出中,即使 vt-2/0/10 已启用并启动,也没有流量通过。这是意料之中的,因为接口已设置为 backup。
意义
当一切正常运行时,流量会通过冗余虚拟接口 rvt0,并且所有流量都通过其活动成员接口。如果两个成员接口均未设置为 active 或 backup,则流量应在两个接口之间进行负载均衡。
验证是否立即故障转移到备份虚拟隧道
目的
验证当包含活动成员接口的 MPC 发生故障或重新启动时,通过接口 rvt0 的所有流量是否立即故障转移到备份成员接口。
对于此任务,建议通过 monitor interface vt-2/0/10 命令打开一个窗口,显示备份接口的实时统计信息,以及另一个窗口,从中重新启动包含活动成员接口的 MPC。
行动
在作模式下,输入 request chassis fpc slot 1 restart 命令并观察备份成员接口的实时统计信息。
user@PE2# request chassis fpc slot 1 restart Interface: vt-2/0/10, Enabled, Link is Up Encapsulation: VPN-Loopback-tunnel, Speed: 1000mbps Traffic statistics: Current delta Input bytes: 354964428 (14720248 bps) [13220676] Output bytes: 0 (0 bps) [0] Input packets: 7716618 (40000 pps) [287406] Output packets: 0 (0 pps) [0] Error statistics: Input errors: 0 [0] Input drops: 0 [0] Input framing errors: 0 [0] Carrier transitions: 0 [0] Output errors: 0 [0] Output drops: 0 [0]
意义
输出显示,通过该接口的 rvt0 流量立即由备份成员接口完全承载。
了解 MBGP MVPN 中的冗余虚拟隧道接口
在多协议 BGP (MBGP) 组播 VPN (MVPN) 中,路由设备上需要 VT 接口来组播流量,这些设备充当提供商边缘 (PE) 和提供商核心 (P) 组合路由器,以优化核心链路上的带宽使用情况。当 P 路由器同时充当 PE 路由器(组播流量的出口点)时,VT 接口会阻止流量复制。
从 Junos OS 12.3 版开始,您最多可以在一个路由实例中配置八个 VT 接口,从而在同一组播 VPN 路由实例中提供隧道 PIC 冗余。当活动 VT 接口发生故障时,辅助接口将接管,您可以继续管理组播流量,而不会出现重复。
RSVP 点对多点提供商隧道以及组播 LDP 提供商隧道支持冗余 VT 接口。此功能也适用于 Extranet。
您可以将其中一个 VT 接口配置为主接口。如果将 VT 接口配置为主接口,则该接口将成为下一跃点,用于从标签交换路径 (LSP) 上的核心进入路由实例的流量。如果将 VT 接口配置为主接口,并且该 VT 接口同时用于单播和组播流量,则只有组播流量受到影响。
如果未将 VT 接口配置为主接口,或者主 VT 接口不可用,则会选择其中一个可用的已配置 VT 接口作为下一跃点,用于从 LSP 上的核心进入路由实例的流量。如果正在使用的 VT 接口因任何原因出现故障,则会在路由实例中选择另一个可用配置的 VT 接口。当正在使用的 VT 接口发生变化时,实例中的所有组播路由也会将其反向路径转发 (RPF) 接口切换到新的 VT 接口,以便接收流量。
为了充分发挥冗余的优势,我们建议在配置多个 VT 接口时,至少将其中一个 VT 接口与其他 VT 接口位于不同的隧道 PIC 上。但是,Junos OS 不会强制执行此规定。
示例:在 MBGP MVPN 中配置冗余虚拟隧道接口
此示例说明如何在多协议 BGP (MBGP) 组播 VPN (MVPN) 中配置冗余虚拟隧道 (VT) 接口。要进行配置,请在路由实例中包含多个 VT 接口,并可选择将 primary
语句应用于其中一个 VT 接口。
要求
配置了冗余 VT 接口的路由设备必须运行 Junos OS 12.3 或更高版本。
概述
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit]
级的 CLI 中。
设备 CE1
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.1/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.1/24 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols pim rp static address 198.51.100.0 set protocols pim interface all set routing-options router-id 192.0.2.1
设备 CE2
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.18/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.6/24 set protocols sap listen 192.168.0.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols pim rp static address 198.51.100.0 set protocols pim interface all set routing-options router-id 192.0.2.6
设备 CE3
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.22/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.7/24 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols pim rp static address 198.51.100.0 set protocols pim interface all set routing-options router-id 192.0.2.7
设备 P
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.6/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.1.1.9/30 set interfaces ge-1/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.0.2.3/24 set protocols mpls interface ge-1/2/0.0 set protocols mpls interface ge-1/2/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols ospf area 0.0.0.0 interface ge-1/2/1.0 set protocols ldp interface ge-1/2/0.0 set protocols ldp interface ge-1/2/1.0 set protocols ldp p2mp set routing-options router-id 192.0.2.3
设备 PE1
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.2/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.1.1.5/30 set interfaces ge-1/2/1 unit 0 family mpls set interfaces vt-1/2/0 unit 2 family inet set interfaces lo0 unit 0 family inet address 192.0.2.2/24 set interfaces lo0 unit 1 family inet address 198.51.100.0/24 set protocols mpls interface ge-1/2/1.0 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.0.2.2 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 192.0.2.4 set protocols bgp group ibgp neighbor 192.0.2.5 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/1.0 set protocols ldp interface ge-1/2/1.0 set protocols ldp p2mp set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface ge-1/2/0.0 set routing-instances vpn-1 interface vt-1/2/0.2 multicast set routing-instances vpn-1 interface lo0.1 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 provider-tunnel ldp-p2mp set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set routing-instances vpn-1 protocols pim rp static address 198.51.100.0 set routing-instances vpn-1 protocols pim interface ge-1/2/0.0 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 192.0.2.2 set routing-options autonomous-system 1001
设备 PE2
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.10/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/2 unit 0 family inet address 10.1.1.13/30 set interfaces ge-1/2/2 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.1.1.17/30 set interfaces ge-1/2/1 unit 0 family mpls set interfaces vt-1/1/0 unit 0 family inet set interfaces vt-1/2/1 unit 0 family inet set interfaces lo0 unit 0 family inet address 192.0.2.4/24 set interfaces lo0 unit 1 family inet address 203.0.113.4/24 set protocols mpls interface ge-1/2/0.0 set protocols mpls interface ge-1/2/2.0 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.0.2.4 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 192.0.2.2 set protocols bgp group ibgp neighbor 192.0.2.5 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols ospf area 0.0.0.0 interface ge-1/2/2.0 set protocols ldp interface ge-1/2/0.0 set protocols ldp interface ge-1/2/2.0 set protocols ldp p2mp set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface vt-1/1/0.0 multicast set routing-instances vpn-1 interface vt-1/1/0.0 primary set routing-instances vpn-1 interface vt-1/2/1.0 multicast set routing-instances vpn-1 interface ge-1/2/1.0 set routing-instances vpn-1 interface lo0.1 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/1.0 set routing-instances vpn-1 protocols pim rp static address 198.51.100.0 set routing-instances vpn-1 protocols pim interface ge-1/2/1.0 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 192.0.2.4 set routing-options autonomous-system 1001
设备 PE3
set interfaces ge-1/2/0 unit 0 family inet address 10.1.1.14/30 set interfaces ge-1/2/0 unit 0 family mpls set interfaces ge-1/2/1 unit 0 family inet address 10.1.1.21/30 set interfaces ge-1/2/1 unit 0 family mpls set interfaces vt-1/2/0 unit 5 family inet set interfaces lo0 unit 0 family inet address 192.0.2.5/24 set interfaces lo0 unit 1 family inet address 203.0.113.5/24 set protocols mpls interface ge-1/2/0.0 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.0.2.5 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 192.0.2.2 set protocols bgp group ibgp neighbor 192.0.2.4 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 set protocols ldp interface ge-1/2/0.0 set protocols ldp p2mp set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface vt-1/2/0.5 multicast set routing-instances vpn-1 interface ge-1/2/1.0 set routing-instances vpn-1 interface lo0.1 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/1.0 set routing-instances vpn-1 protocols pim rp static address 198.51.100.0 set routing-instances vpn-1 protocols pim interface ge-1/2/1.0 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 192.0.2.5 set routing-options autonomous-system 1001
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要在 MBGP MVPN 中配置冗余 VT 接口,请执行以下作:
配置物理接口和环路接口。
[edit interfaces] user@PE2# set ge-1/2/0 unit 0 family inet address 10.1.1.10/30 user@PE2# set ge-1/2/0 unit 0 family mpls user@PE2# set ge-1/2/2 unit 0 family inet address 10.1.1.13/30 user@PE2# set ge-1/2/2 unit 0 family mpls user@PE2# set ge-1/2/1 unit 0 family inet address 10.1.1.17/30 user@PE2# set ge-1/2/1 unit 0 family mpls user@PE2# set lo0 unit 0 family inet address 192.0.2.4/24 user@PE2# set lo0 unit 1 family inet address 203.0.113.4/24
配置 VT 接口。
每个 VT 接口都可以在一个路由实例下进行配置。
[edit interfaces] user@PE2# set vt-1/1/0 unit 0 family inet user@PE2# set vt-1/2/1 unit 0 family inet
在物理接口上配置 MPLS。
[edit protocols mpls] user@PE2# set interface ge-1/2/0.0 user@PE2# set interface ge-1/2/2.0
配置 BGP。
[edit protocols bgp group ibgp] user@PE2# set type internal user@PE2# set local-address 192.0.2.4 user@PE2# set family inet-vpn any user@PE2# set family inet-mvpn signaling user@PE2# set neighbor 192.0.2.2 user@PE2# set neighbor 192.0.2.5
配置内部网关协议。
[edit protocols ospf area 0.0.0.0] user@PE2# set interface lo0.0 passive user@PE2# set interface ge-1/2/0.0 user@PE2# set interface ge-1/2/2.0
配置 LDP。
[edit protocols ldp] user@PE2# set interface ge-1/2/0.0 user@PE2# set interface ge-1/2/2.0 user@PE2# set p2mp
配置路由策略。
[edit policy-options policy-statement parent_vpn_routes] user@PE2# set from protocol bgp user@PE2# set then accept
配置路由实例。
[edit routing-instances vpn-1] user@PE2# set instance-type vrf user@PE2# set interface ge-1/2/1.0 user@PE2# set interface lo0.1 user@PE2# set route-distinguisher 100:100 user@PE2# set vrf-target target:1:1 user@PE2# set protocols ospf export parent_vpn_routes user@PE2# set protocols ospf area 0.0.0.0 interface lo0.1 passive user@PE2# set protocols ospf area 0.0.0.0 interface ge-1/2/1.0 user@PE2# set protocols pim rp static address 198.51.100.0 user@PE2# set protocols pim interface ge-1/2/1.0 mode sparse user@PE2# set protocols mvpn
在路由实例中配置冗余 VT 接口。
将 vt-1/1/0.0 设为主接口。
[edit routing-instances vpn-1] user@PE2# set interface vt-1/1/0.0 multicast primary user@PE2# set interface vt-1/2/1.0 multicast
配置路由器 ID 和自治系统 (AS) 编号。
[edit routing-options] user@PE2# set router-id 192.0.2.4 user@PE2# set autonomous-system 1001
结果
在配置模式下,输入show interfaces、show routing-instancesshow protocolsshow policy-options和show routing-options命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
user@PE2# show interfaces ge-1/2/0 { unit 0 { family inet { address 10.1.1.10/30; } family mpls; } } ge-1/2/2 { unit 0 { family inet { address 10.1.1.13/30; } family mpls; } } ge-1/2/1 { unit 0 { family inet { address 10.1.1.17/30; } family mpls; } } vt-1/1/0 { unit 0 { family inet; } } vt-1/2/1 { unit 0 { family inet; } } lo0 { unit 0 { family inet { address 192.0.2.4/24; } } unit 1 { family inet { address 203.0.113.4/24; } } }
user@PE2# show protocols mpls { interface ge-1/2/0.0; interface ge-1/2/2.0; } bgp { group ibgp { type internal; local-address 192.0.2.4; family inet-vpn { any; } family inet-mvpn { signaling; } neighbor 192.0.2.2; neighbor 192.0.2.5; } } ospf { area 0.0.0.0 { interface lo0.0 { passive; } interface ge-1/2/0.0; interface ge-1/2/2.0; } } ldp { interface ge-1/2/0.0; interface ge-1/2/2.0; p2mp; }
user@PE2# show policy-options policy-statement parent_vpn_routes { from protocol bgp; then accept; }
user@PE2# show routing-instances vpn-1 { instance-type vrf; interface vt-1/1/0.0 { multicast; primary; } interface vt-1/2/1.0 { multicast; } interface ge-1/2/1.0; interface lo0.1; route-distinguisher 100:100; vrf-target target:1:1; protocols { ospf { export parent_vpn_routes; area 0.0.0.0 { interface lo0.1 { passive; } interface ge-1/2/1.0; } } pim { rp { static { address 198.51.100.0; } } interface ge-1/2/1.0 { mode sparse; } } mvpn; } }
user@PE2# show routing-options router-id 192.0.2.4; autonomous-system 1001;
如果完成设备配置,请从配置模式输入 commit 。
验证
确认配置工作正常。
show multicast route extensive instance instance-name
当通过 VPN 传输组播流量时,命令还会在组播转发表中显示 VT 接口。
检查 LSP 路由
目的
验证是否已将预期的 LT 接口分配给 LDP 获知的路由。
行动
在作模式下,输入 show route table mpls 命令。
user@PE2> show route table mpls mpls.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 02:09:36, metric 1 Receive 1 *[MPLS/0] 02:09:36, metric 1 Receive 2 *[MPLS/0] 02:09:36, metric 1 Receive 13 *[MPLS/0] 02:09:36, metric 1 Receive 299776 *[LDP/9] 02:09:14, metric 1 > via ge-1/2/0.0, Pop 299776(S=0) *[LDP/9] 02:09:14, metric 1 > via ge-1/2/0.0, Pop 299792 *[LDP/9] 02:09:09, metric 1 > via ge-1/2/2.0, Pop 299792(S=0) *[LDP/9] 02:09:09, metric 1 > via ge-1/2/2.0, Pop 299808 *[LDP/9] 02:09:04, metric 1 > via ge-1/2/0.0, Swap 299808 299824 *[VPN/170] 02:08:56 > via ge-1/2/1.0, Pop 299840 *[VPN/170] 02:08:56 > via ge-1/2/1.0, Pop 299856 *[VPN/170] 02:08:56 receive table vpn-1.inet.0, Pop 299872 *[LDP/9] 02:08:54, metric 1 > via vt-1/1/0.0, Pop via ge-1/2/2.0, Swap 299872
在配置模式下,通过从 vt-1/1/0.0 接口中移除
primary
语句并将其添加到 vt-1/2/1.0 接口来更改主 VT 接口。[edit routing-instances vpn-1] user@PE2# delete interface vt-1/1/0.0 primary user@PE2# set interface vt-1/2/1.0 primary user@PE2# commit
在作模式下,输入 show route table mpls 命令。
user@PE2> show route table mpls mpls.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 02:09:36, metric 1 Receive 1 *[MPLS/0] 02:09:36, metric 1 Receive 2 *[MPLS/0] 02:09:36, metric 1 Receive 13 *[MPLS/0] 02:09:36, metric 1 Receive 299776 *[LDP/9] 02:09:14, metric 1 > via ge-1/2/0.0, Pop 299776(S=0) *[LDP/9] 02:09:14, metric 1 > via ge-1/2/0.0, Pop 299792 *[LDP/9] 02:09:09, metric 1 > via ge-1/2/2.0, Pop 299792(S=0) *[LDP/9] 02:09:09, metric 1 > via ge-1/2/2.0, Pop 299808 *[LDP/9] 02:09:04, metric 1 > via ge-1/2/0.0, Swap 299808 299824 *[VPN/170] 02:08:56 > via ge-1/2/1.0, Pop 299840 *[VPN/170] 02:08:56 > via ge-1/2/1.0, Pop 299856 *[VPN/170] 02:08:56 receive table vpn-1.inet.0, Pop 299872 *[LDP/9] 02:08:54, metric 1 > via vt-1/2/1.0, Pop via ge-1/2/2.0, Swap 299872
意义
使用原始配置时,输出显示 vt-1/1/0.0 接口。如果将主接口更改为 vt-1/2/1.0,则输出会显示 vt-1/2/1.0 接口。
变更历史表
是否支持某项功能取决于您使用的平台和版本。使用 功能浏览器 查看您使用的平台是否支持某项功能。