配置多协议 BGP 组播 VPN
了解基于多协议 BGP 的组播 VPN:下一代
基于多协议 BGP 的组播 VPN(也称为下一代第 3 层 VPN 组播)是继双组播 VPN (draft-rosen) 之后的下一个发展,为希望通过第 3 层 VPN 配置组播的管理员提供了更简单的解决方案。
基于 BGP 的多协议组播 VPN 的主要特征是:
它们扩展了第 3 层 VPN 服务 (RFC 2547) 以支持第 3 层 VPN 服务提供商的 IP 组播。
它们遵循 RFC 2547 为单播 VPN 指定的相同架构。 具体而言,BGP 用作控制平面。
它们消除了对虚拟路由器 (VR) 模型的要求,该模型在互联网草案 draft-rosen-vpn-mcast( MPLS/BGP VPN 中的组播)中指定,适用于组播 VPN。
它们依赖于基于 RFC 的单播,并扩展用于 AS 内部和 AS 间通信。
基于多协议 BGP 的 VPN 由两组站点定义:发送方集和接收方集。接收方站点集中的主机可以接收组播流量,发送方站点集中的主机可以发送组播流量。站点集既可以是接收方也可以是发送方,这意味着此类站点中的主机可以发送和接收组播流量。基于多协议 BGP 的 VPN 可以跨越组织(因此站点可以是内部网或外部网),可以跨越服务提供商,并且可以重叠。
站点管理员根据客户要求以及现有的 BGP 和 MPLS VPN 基础架构配置基于 BGP 的多协议 VPN。
MVPN 中的路由反射器行为
基于 BGP 的组播 VPN (MVPN) 客户组播路由由路由反射器聚合。路由反射器 (RR) 可能会从多个提供商边缘 (PE) 路由器接收具有相同 NLRI 的客户组播路由,但 RR 仅重新播发一个此类 NLRI。如果播发此 NLRI 的 PE 路由器集发生更改,RR 不会更新路由。这样可以最大程度地减少路由改动。为此,RR 将下一跃点设置为自身。此外,RR 会将发起方 ID 设置为自身。如果 RR 收到 RR 已在播发的 NLRI 的后续客户组播路由,则可避免不必要的最佳路径计算。这允许使用相同的 MVPN NLRI 聚合源活动和客户组播路由。
参见
示例:将点对多点 LDP LSP 配置为 AS 内部 MBGP MVPN 的数据平面
此示例说明如何将点对多点 (P2MP) LDP 标签交换路径 (LSP) 配置为自治系统 (AS) 多协议 BGP (MBGP) 组播 VPN (MVPN) 的数据平面。此功能非常适合已在 MPLS 主干网中运行 LDP 并需要 MBGP MVPN 功能的服务提供商。
要求
准备工作:
配置路由器接口。请参阅 Junos OS 网络接口库了解路由设备。
配置内部网关协议或静态路由。请参阅 Junos OS 路由协议库了解路由设备。
配置 BGP-MVPN 控制平面。请参阅《组播协议用户指南》中的基于 MBGP 的组播 VPN 树。
将 LDP 配置为所有 P2MP 提供商和提供商边缘路由器上的信令协议。请参阅 Junos OS MPLS 应用程序用户指南中的 LDP 操作。
将 P2MP LDP LSP 配置为属于发送方站点集的 MVPN 中每个 PE 路由器上的提供商隧道技术。请参阅 Junos OS MPLS 应用程序用户指南。
在 MVPN 路由实例中配置虚拟环路隧道接口(需要隧道 PIC)或
vrf-table-label
语句。如果配置语句vrf-table-label
,则还可以配置可选的虚拟环路隧道接口。在外部网场景中,当出口 PE 路由器属于多个 MVPN 实例,所有这些实例都需要接收特定的组播流时,出口 PE 路由器上需要一个虚拟环路隧道接口(和一个隧道 PIC)。请参阅路由设备的 Junos OS 服务接口库中的为 VRF 配置虚拟环路隧道查找。
如果出口 PE 路由器也是点对多点 LSP 的中转路由器,则出口 PE 路由器上需要虚拟环路隧道接口(和隧道 PIC)。请参阅 组播协议用户指南 中的为 VRF 表查找配置虚拟环路隧道 。
某些将点对组播 LDP LSP 作为数据平面的 MBGP MVPN 外联网配置需要在出口 PE 路由器上具有虚拟环路隧道接口(和隧道 PIC)。当出口 PE 路由器属于多个 MVPN 实例,且所有实例都需要接收特定的组播流时,
vrf-table-table
无法使用该语句。 在图 1 中,CE1 和 CE2 路由器属于不同的 MVPN。但是,他们希望接收由源发送的组播流。如果在路由器 PE2 上配置了vrf-table-label
语句,则无法将数据包同时转发到 CE1 和 CE2。这会导致数据包丢失。如果在路由器 PE2 上的两个 MVPN 路由实例中使用了虚拟环路隧道接口,则数据包将转发到路由器 CE1 和 CE2。因此,如果您使用的是出口 PE 路由器属于接收特定组播流的多个 MVPN 实例的 Extranet 场景,或者将出口 PE 路由器用作点对多点 LSP 的中转路由器,则需要设置虚拟环路隧道接口。注意:从 Junos OS 15.1X49-D50 版和 Junos OS 17.3R1 版开始,该
vrf-table-label
语句允许将内部标签映射到特定的虚拟路由和转发 (VRF)。此映射允许检查出口 VPN 路由器上的封装 IP 报头。对于 SRX 系列防火墙,vrf-table-label
该语句目前仅在物理接口上受支持。解决方法是停用vrf-table-label
或使用物理接口。图 1:以 P2MP LDP LSP 作为数据平面的 MBGP MVPN 外网配置有关详细信息 ,请参阅为 VRF 表查找配置虚拟环路隧道 。
概述
本主题介绍如何将 P2MP LDP LSP 配置为 AS 内部选择性提供程序隧道的数据平面。选择性 P2MP LSP 仅根据特定客户组播流的带宽阈值触发。PE 路由器为给定的客户源和客户组对(C-S、C-G)设置单独的 P2MP LDP LSP。C-S 位于属于发送方站点集中的 PE 路由器后面。不支持跨 MVPN 聚合 AS 内部选择性提供程序隧道。
配置选择性提供程序隧道时,叶将发现 P2MP LSP 根,如下所示。后面带有客户组播流接收器的 PE 路由器需要发现 PE 路由器的身份(以及提供商隧道信息),以及其后面的客户组播流的来源。此信息是使用由 PE 路由器发起且背后有 C-S 的 S-PMSI AD 路由动态自动发现的。
Junos OS 还支持 P2MP LDP LSP 作为 AS 内部包含提供商隧道的数据平面。这些隧道基于 MVPN 配置触发。属于发送方站点集的 PE 路由器为给定 MVPN 设置单独的 P2MP LSP LSP。此 PE 路由器是 P2MP LSP 的根。不支持跨 MVPN 聚合 AS 内部(含 AS 内部)提供商隧道。
配置非独占提供程序隧道时,叶子会发现 P2MP LSP 根,如下所示。具有给定 MVPN 接收方站点的 PE 路由器需要通过该 MVPN 的发送方站点发现 PE 路由器的身份(以及提供商隧道信息)。此信息是使用具有发送方站点的 PE 路由器发起的 AS 内部自动发现路由动态自动发现的。
拓扑学
图 2 显示了此示例中使用的拓扑。

在图 2 中,路由器执行以下功能:
R1 和 R2 是提供商 (P) 路由器。
R0、R3、R4 和 R5 是提供商边缘 (PE) 路由器。
在所有 PE 路由器上配置 MBGP MVPN。
定义了两个 VPN:绿色和红色。
路由器 R0 在单独的路由实例中同时为绿色和红色客户边缘路由器提供服务。
路由器 R3 连接到绿色客户边缘路由器。
路由器 R5 连接到单个路由实例中重叠的绿色和红色客户边缘路由器。
路由器 R4 连接到单个路由实例中重叠的绿色和红色客户边缘路由器。
OSPF 和多点 LDP (mLDP) 在核心中运行。
路由器 R1 是路由反射器 (RR),路由器 R2 是冗余 RR。
路由器 R0、R3、R4 和 R5 是客户端内部 BGP (IBGP) 对等方。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,然后将命令复制并粘贴到层次结构级别的 CLI [edit]
中。
set protocols ldp interface fe-0/2/1.0 set protocols ldp interface fe-0/2/3.0 set protocols ldp p2mp set routing-instance red instance-type vrf set routing-instance red interface vt-0/1/0.1 set routing-instance red interface lo0.1 set routing-instance red route-distinguisher 10.254.1.1:1 set routing-instance red provider-tunnel ldp-p2mp set routing-instance red provider-tunnel selective group 224.1.1.1/32 source 192.168.1.1/32 ldp-p2mp
程序
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅《Junos OS CLI 用户指南》中的在配置模式下使用 CLI 编辑器。
要将 P2MP LDP LSP 配置为 AS 内部 MBGP MVPN 的数据平面:
在所有路由器上配置 LDP。
[edit protocols ldp] user@host# set interface fe-0/2/1.0 user@host# set interface fe-0/2/3.0 user@host# set p2mp
配置提供程序隧道。
[edit routing-instance red ] user@host# set instance-type vrf user@host# set interface vt-0/1/0.1 user@host# set interface lo0.1 user@host# set route-distinguisher 10.254.1.1:1 user@host# set provider-tunnel ldp-p2mp
配置选择性提供程序隧道。
user@host# set provider-tunnel selective group 224.1.1.1/32 source 192.168.1.1/32 ldp-p2mp
如果完成设备配置,请提交配置。
user@host# commit
结果
在配置模式下,输入 show protocols
和 show routing-intances
命令确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明以进行更正。
user@host# show protocols ldp { interface fe-0/2/1.0; interface fe-0/2/3.0; p2mp; }
user@host# show routing-instances red { instance-type vrf; interface vt-0/1/0.1; interface lo0.1; route-distinguisher 10.254.1.1:1; provider-tunnel { ldp-p2mp; } selective { group 224.1.1.1/32 { source 192.168.1.1/32 { ldp-p2mp; } } } } }
验证
要验证配置,请运行以下命令:
ping MPLS LDP P2MP 以 ping P2MP LSP 的端点。
显示 LDP 数据库 以显示 LDP P2MP 标签绑定并确保 LDP P2MP LSP 发出信号。
显示 LDP 会话详细信息 以显示与对等方交换的 LDP 功能。“ 播发的功能 ”和 “接收的功能 ”字段应包括 p2mp。
显示 LDP 流量统计信息 P2MP :显示 P2MP LSP 的数据流量统计信息。
显示 mvpn 实例、 显示 mvpn 邻居和显示 mvpn c 组播 以显示组播 VPN 路由实例信息,并确保 LDP P2MP LSP 作为 S-PMSI 与 MVPN 关联。
在 PE 路由器上显示组播路由实例详细信息,以确保所有主机都能接收流量,并显示接收方的统计信息。
显示路由标签 label 详细信息 以显示 P2MP 转发等效类 (FEC)(如果标签是 LDP P2MP LSP 的输入标签)。
示例:使用 MBGP MVPN 为 IP 组播配置入口复制
要求
此示例中使用的路由器包括瞻博网络 M 系列多服务边缘路由器、T 系列核心路由器或 MX 系列 5G 通用路由平台。将入口复制用于 IP 组播时,必须为每个参与路由器配置用于控制平面过程的 BGP,并为数据提供程序隧道配置入口复制,从而形成 MPLS 点对点 LSP 的完整网格。入口复制隧道可以是选择性的,也可以是包容性的,具体取决于路由实例中提供程序隧道的配置。
概述
ingress-replication
提供商隧道类型使用路由器之间的单播隧道来创建组播分布树。
mpls-internet-multicast
路由实例类型使用 MBGP(或新一代)MVPN,使用入口复制提供程序隧道通过 MPLS 云在路由器之间传输 IP 组播数据。使用 MVPN 在 PE 路由器之间传输组播数据时,也可以配置入口复制。
mpls-internet-multicast
路由实例是仅用于控制平面过程的非转发实例。它不支持任何接口配置。只能为逻辑系统定义一个mpls-internet-multicast
路由实例。用于 IP 组播的所有组播和单播路由仅与默认路由实例 ()inet.0
关联,而不与配置的路由实例关联。mpls-internet-multicast
路由实例类型是为每个路由器上的默认主实例配置的,并且还包含在默认实例的层次结构级别。[edit protocols pim]
对于每个 mpls-internet-multicast
路由实例, ingress-replication
语句在语句下和层次结构级别下 provider-tunnel
都是必需的 [edit routing-instances routing-instance-name provider-tunnel selective group source]
。
当需要将新目标添加到入口复制提供程序隧道时,生成的行为会有所不同,具体取决于入口复制提供程序隧道的配置方式:
create-new-ucast-tunnel
— 配置此语句后,将创建到目标的新单播隧道,并在不再需要目标时将其删除。对于使用入口复制的 RSVP LSP,请使用此模式。label-switched-path-template (Multicast)
— 配置此语句后,LSP 模板将用于入口复制的点对多点 LSP。
拓扑学
IP 拓扑由位于 IP 组播域边缘的路由器组成。每个路由器都有一组针对 MPLS 云配置的 IP 接口和一组针对 IP 路由器配置的接口。参见 图 3。互联网组播流量通过 MPLS 云在 IP 路由器之间传输,数据平面使用入口复制隧道,控制平面使用全网状 IBGP 会话。

配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,然后将命令复制并粘贴到层次结构级别的 CLI [edit]
中。
边界路由器 C
set protocols mpls ipv6-tunneling set protocols mpls interface all set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.10.61 set protocols bgp group ibgp family inet unicast set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet6 unicast set protocols bgp group ibgp family inet6-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp family inet6-mvpn signaling set protocols bgp group ibgp export to-bgp set protocols bgp group ibgp neighbor 10.255.10.97 set protocols bgp group ibgp neighbor 10.255.10.55 set protocols bgp group ibgp neighbor 10.255.10.57 set protocols bgp group ibgp neighbor 10.255.10.59 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 set protocols ospf area 0.0.0.0 interface so-1/3/1.0 set protocols ospf area 0.0.0.0 interface so-0/3/0.0 set protocols ospf3 area 0.0.0.0 interface lo0.0 set protocols ospf3 area 0.0.0.0 interface so-1/3/1.0 set protocols ospf3 area 0.0.0.0 interface so-0/3/0.0 set protocols ldp interface all set protocols pim rp static address 192.0.2.2 set protocols pim rp static address 2::192.0.2.2 set protocols pim interface fe-0/1/0.0 set protocols pim mpls-internet-multicast set routing-instances test instance-type mpls-internet-multicast set routing-instances test provider-tunnel ingress-replication label-switched-path set routing-instances test protocols mvpn
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
以下示例说明如何在具有路由实例类型的 mpls-internet-multicast
IP 组播实例上配置入口复制。此外,此示例还演示如何配置选择性提供程序隧道,该隧道在每次需要将新目标添加到组播分发树时选择新的单播隧道。
此示例显示边界路由器 C 和边缘 IP 路由器 C 之间的链路配置,边界路由器 C 从中接收 PIM 加入消息。
启用 MPLS。
[edit protocols mpls] user@Border_Router_C# set ipv6-tunneling user@Border_Router_C# set interface all
配置信令协议,例如 RSVP 或 LDP。
[edit protocols ldp] user@Border_Router_C# set interface all
配置 IBGP 对等会话的全网状网络。
[edit protocols bgp group ibgp] user@Border_Router_C# set type internal user@Border_Router_C# set local-address 10.255.10.61 user@Border_Router_C# set neighbor 10.255.10.97 user@Border_Router_C# set neighbor 10.255.10.55 user@Border_Router_C# set neighbor 10.255.10.57 user@Border_Router_C# set neighbor 10.255.10.59 user@Border_Router_C# set export to-bgp
配置与多协议 BGP 相关的设置,以便 BGP 会话携带必要的 NLRI。
[edit protocols bgp group ibgp] user@Border_Router_C# set family inet unicast user@Border_Router_C# set family inet-vpn any user@Border_Router_C# set family inet6 unicast user@Border_Router_C# set family inet6-vpn any user@Border_Router_C# set family inet-mvpn signaling user@Border_Router_C# set family inet6-mvpn signaling
配置内部网关协议 (IGP)。
此示例显示了在接口上配置 OSPF 和 OSPF 版本 3 的双堆栈配置。
[edit protocols ospf3] user@Border_Router_C# set area 0.0.0.0 interface lo0.0 user@Border_Router_C# set area 0.0.0.0 interface so-1/3/1.0 user@Border_Router_C# set area 0.0.0.0 interface so-0/3/0.0 [edit protocols ospf] user@Border_Router_C# set traffic-engineering user@Border_Router_C# set area 0.0.0.0 interface fxp0.0 disable user@Border_Router_C# set area 0.0.0.0 interface lo0.0 user@Border_Router_C# set area 0.0.0.0 interface so-1/3/1.0 user@Border_Router_C# set area 0.0.0.0 interface so-0/3/0.0
在面向边缘设备的接口上配置全局 PIM 实例。
核心中未配置 PIM。
[edit protocols pim] user@Border_Router_C# set rp static address 192.0.2.2 user@Border_Router_C# set rp static address 2::192.0.2.2 user@Border_Router_C# set interface fe-0/1/0.0 user@Border_Router_C# set mpls-internet-multicast
配置入口复制提供程序隧道,以便在每次需要将目标添加到组播分发树时创建新的单播隧道。
[edit routing-instances test] user@Border_Router_C# set instance-type mpls-internet-multicast user@Border_Router_C# set provider-tunnel ingress-replication label-switched-path user@Border_Router_C# set protocols mvpn
注意:或者,使用该 label-switched-path-template 语句为入口隧道配置点对点 LSP。
将点对点 LSP 配置为使用默认模板设置(仅在使用 RSVP 隧道时才需要这样做)。例如:
[edit routing-instances test provider-tunnel] user@Border_Router_C# set ingress-replication label-switched-path label-switched-path-template default-template user@Border_Router_C# set selective group 203.0.113.0/24 source 192.168.195.145/32 ingress-replication label-switched-path
提交配置。
user@Border_Router_C# commit
结果
在配置模式下,发出 and show protocols
show routing-instances
命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@Border_Router_C# show protocols mpls { ipv6-tunneling; interface all; } bgp { group ibgp { type internal; local-address 10.255.10.61; family inet { unicast; } family inet-vpn { any; } family inet6 { unicast; } family inet6-vpn { any; } family inet-mvpn { signaling; } family inet6-mvpn { signaling; } export to-bgp; ## 'to-bgp' is not defined neighbor 10.255.10.97; neighbor 10.255.10.55; neighbor 10.255.10.57; neighbor 10.255.10.59; } } ospf { traffic-engineering; area 0.0.0.0 { interface fxp0.0 { disable; } interface lo0.0; interface so-1/3/1.0; interface so-0/3/0.0; } } ospf3 { area 0.0.0.0 { interface lo0.0; interface so-1/3/1.0; interface so-0/3/0.0; } } ldp { interface all; } pim { rp { static { address 192.0.2.2; address 2::192.0.2.2; } } interface fe-0/1/0.0; mpls-internet-multicast; }
user@Border_Router_C# show routing-instances test { instance-type mpls-internet-multicast; provider-tunnel { ingress-replication { label-switched-path; } } protocols { mvpn; } }
验证
确认配置工作正常。以下操作输出适用于 LDP 入口复制仅 SPT 模式。IP 路由器 B 后面的组播源。组播接收器位于 IP 路由器 C 后面。
- 检查边界路由器 C 上的入口复制状态
- 检查边界路由器 C 上 MVPN 路由实例的路由表
- 检查边界路由器 C 上的 MVPN 邻居
- 检查边界路由器 C 上的 PIM 联接状态
- 检查边界路由器 C 上的组播路由状态
- 检查边界路由器 B 上的入口复制状态
- 检查边界路由器 B 上 MVPN 路由实例的路由表
- 检查边界路由器 B 上的 MVPN 邻居
- 检查边界路由器 B 上的 PIM 加入状态
- 检查边界路由器 B 上的组播路由状态
检查边界路由器 C 上的入口复制状态
目的
使用 show ingress-replication mvpn
命令检查入口复制状态。
行动
user@Border_Router_C> show ingress-replication mvpn Ingress Tunnel: mvpn:1 Application: MVPN Unicast tunnels Leaf Address Tunnel-type Mode State 10.255.10.61 P2P LSP Existing Up
意义
入口复制使用点对点 LSP,并且处于 Up 状态。
检查边界路由器 C 上 MVPN 路由实例的路由表
目的
使用 show route table
命令检查路由状态。
行动
user@Border_Router_C> show route table test.mvpn test.mvpn.0: 5 destinations, 7 routes (5 active, 1 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1:0:0:10.255.10.61/240 *[BGP/170] 00:45:55, localpref 100, from 10.255.10.61 AS path: I, validation-state: unverified > via so-2/0/1.0 1:0:0:10.255.10.97/240 *[MVPN/70] 00:47:19, metric2 1 Indirect 5:0:0:32:192.168.195.106:32:198.51.100.1/240 *[PIM/105] 00:06:35 Multicast (IPv4) Composite [BGP/170] 00:06:35, localpref 100, from 10.255.10.61 AS path: I, validation-state: unverified > via so-2/0/1.0 6:0:0:1000:32:192.0.2.2:32:198.51.100.1/240 *[PIM/105] 00:07:03 Multicast (IPv4) Composite 7:0:0:1000:32:192.168.195.106:32:198.51.100.1/240 *[MVPN/70] 00:06:35, metric2 1 Multicast (IPv4) Composite [PIM/105] 00:05:35 Multicast (IPv4) Composite test.mvpn-inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1:0:0:10.255.10.61/432 *[BGP/170] 00:45:55, localpref 100, from 10.255.10.61 AS path: I, validation-state: unverified > via so-2/0/1.0 1:0:0:10.255.10.97/432 *[MVPN/70] 00:47:19, metric2 1 Indirect
意义
预期的路由将填充 test.mvpn 路由表。
检查边界路由器 C 上的 MVPN 邻居
目的
使用命令检查 show mvpn neighbor
邻居状态。
行动
user@Border_Router_C> show mvpn neighbor MVPN instance: Legend for provider tunnel S- Selective provider tunnel Legend for c-multicast routes properties (Pr) DS -- derived from (*, c-g) RM -- remote VPN route Family : INET Instance : test MVPN Mode : SPT-ONLY Neighbor Inclusive Provider Tunnel 10.255.10.61 INGRESS-REPLICATION:MPLS Label 16:10.255.10.61 MVPN instance: Legend for provider tunnel S- Selective provider tunnel Legend for c-multicast routes properties (Pr) DS -- derived from (*, c-g) RM -- remote VPN route Family : INET6 Instance : test MVPN Mode : SPT-ONLY Neighbor Inclusive Provider Tunnel 10.255.10.61 INGRESS-REPLICATION:MPLS Label 16:10.255.10.61
检查边界路由器 C 上的 PIM 联接状态
目的
使用 show pim join extensive
命令检查 PIM 联接状态。
行动
user@Border_Router_C> show pim join extensive Instance: PIM.master Family: INET R = Rendezvous Point Tree, S = Sparse, W = Wildcard Group: 198.51.100.1 Source: * RP: 192.0.2.2 Flags: sparse,rptree,wildcard Upstream interface: Local Upstream neighbor: Local Upstream state: Local RP Uptime: 00:07:49 Downstream neighbors: Interface: ge-3/0/6.0 192.0.2.2 State: Join Flags: SRW Timeout: Infinity Uptime: 00:07:49 Time since last Join: 00:07:49 Number of downstream interfaces: 1 Group: 198.51.100.1 Source: 192.168.195.106 Flags: sparse Upstream protocol: BGP Upstream interface: Through BGP Upstream neighbor: Through MVPN Upstream state: Local RP, Join to Source, No Prune to RP Keepalive timeout: 69 Uptime: 00:06:21 Number of downstream interfaces: 0 Instance: PIM.master Family: INET6 R = Rendezvous Point Tree, S = Sparse, W = Wildcard
检查边界路由器 C 上的组播路由状态
目的
使用 show multicast route extensive
命令检查组播路由状态。
行动
user@Border_Router_C> show multicast route extensive Instance: master Family: INET Group: 198.51.100.1 Source: 192.168.195.106/32 Upstream interface: lsi.0 Downstream interface list: ge-3/0/6.0 Number of outgoing interfaces: 1 Session description: NOB Cross media facilities Statistics: 18 kBps, 200 pps, 88907 packets Next-hop ID: 1048577 Upstream protocol: MVPN Route state: Active Forwarding state: Forwarding Cache lifetime/timeout: forever Wrong incoming interface notifications: 0 Uptime: 00:07:25 Instance: master Family: INET6
检查边界路由器 B 上的入口复制状态
目的
使用 show ingress-replication mvpn
命令检查入口复制状态。
行动
user@Border_Router_B> show ingress-replication mvpn Ingress Tunnel: mvpn:1 Application: MVPN Unicast tunnels Leaf Address Tunnel-type Mode State 10.255.10.97 P2P LSP Existing Up
意义
入口复制使用点对点 LSP,并且处于 Up 状态。
检查边界路由器 B 上 MVPN 路由实例的路由表
目的
使用 show route table
命令检查路由状态。
行动
user@Border_Router_B> show route table test.mvpn test.mvpn.0: 5 destinations, 7 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1:0:0:10.255.10.61/240 *[MVPN/70] 00:49:26, metric2 1 Indirect 1:0:0:10.255.10.97/240 *[BGP/170] 00:48:22, localpref 100, from 10.255.10.97 AS path: I, validation-state: unverified > via so-1/3/1.0 5:0:0:32:192.168.195.106:32:198.51.100.1/240 *[PIM/105] 00:09:02 Multicast (IPv4) Composite [BGP/170] 00:09:02, localpref 100, from 10.255.10.97 AS path: I, validation-state: unverified > via so-1/3/1.0 7:0:0:1000:32:192.168.195.106:32:198.51.100.1/240 *[PIM/105] 00:09:02 Multicast (IPv4) Composite [BGP/170] 00:09:02, localpref 100, from 10.255.10.97 AS path: I, validation-state: unverified > via so-1/3/1.0 test.mvpn-inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1:0:0:10.255.10.61/432 *[MVPN/70] 00:49:26, metric2 1 Indirect 1:0:0:10.255.10.97/432 *[BGP/170] 00:48:22, localpref 100, from 10.255.10.97 AS path: I, validation-state: unverified > via so-1/3/1.0
意义
预期的路由将填充 test.mvpn 路由表。
检查边界路由器 B 上的 MVPN 邻居
目的
使用命令检查 show mvpn neighbor
邻居状态。
行动
user@Border_Router_B> show mvpn neighbor MVPN instance: Legend for provider tunnel S- Selective provider tunnel Legend for c-multicast routes properties (Pr) DS -- derived from (*, c-g) RM -- remote VPN route Family : INET Instance : test MVPN Mode : SPT-ONLY Neighbor Inclusive Provider Tunnel 10.255.10.97 INGRESS-REPLICATION:MPLS Label 16:10.255.10.97 MVPN instance: Legend for provider tunnel S- Selective provider tunnel Legend for c-multicast routes properties (Pr) DS -- derived from (*, c-g) RM -- remote VPN route Family : INET6 Instance : test MVPN Mode : SPT-ONLY Neighbor Inclusive Provider Tunnel 10.255.10.97 INGRESS-REPLICATION:MPLS Label 16:10.255.10.97
检查边界路由器 B 上的 PIM 加入状态
目的
使用 show pim join extensive
命令检查 PIM 联接状态。
行动
user@Border_Router_B> show pim join extensive Instance: PIM.master Family: INET R = Rendezvous Point Tree, S = Sparse, W = Wildcard Group: 198.51.100.1 Source: 192.168.195.106 Flags: sparse,spt Upstream interface: fe-0/1/0.0 Upstream neighbor: Direct Upstream state: Local Source Keepalive timeout: 0 Uptime: 00:09:39 Downstream neighbors: Interface: Pseudo-MVPN Uptime: 00:09:39 Time since last Join: 00:09:39 Number of downstream interfaces: 1 Instance: PIM.master Family: INET6 R = Rendezvous Point Tree, S = Sparse, W = Wildcard
检查边界路由器 B 上的组播路由状态
目的
使用 show multicast route extensive
命令检查组播路由状态。
行动
user@Border_Router_B> show multicast route extensive Instance: master Family: INET Group: 198.51.100.1 Source: 192.168.195.106/32 Upstream interface: fe-0/1/0.0 Downstream interface list: so-1/3/1.0 Number of outgoing interfaces: 1 Session description: NOB Cross media facilities Statistics: 18 kBps, 200 pps, 116531 packets Next-hop ID: 1048580 Upstream protocol: MVPN Route state: Active Forwarding state: Forwarding Cache lifetime/timeout: forever Wrong incoming interface notifications: 0 Uptime: 00:09:43
示例:配置 MBGP 组播 VPN
此示例提供了跨多协议 BGP (MBGP) 第 3 层虚拟专用网络配置组播服务的分步过程。(也称为下一代第 3 层组播 VPN)
要求
此示例使用以下硬件和软件组件:
Junos OS 9.2 或更高版本
五 M 系列、T 系列、TX 系列或 MX 系列瞻博网络路由器
一个能够发送组播流量并支持互联网组管理协议 (IGMP) 的主机系统
一个能够接收组播流量并支持 IGMP 的主机系统
根据您使用的设备,您可能需要配置静态路由以:
组播发送方
发送方在组播接收器上连接到的快速以太网接口
组播接收器
组播发送方上接收器连接到的快速以太网接口
概述和拓扑
配置
在任何配置会话中,最好定期验证是否可以使用 commit check
命令提交配置。
在此示例中,使用以下命令提示符标识正在配置的路由器:
CE1
标识客户边缘 1 (CE1) 路由器PE1
标识提供商边缘 1 (PE1) 路由器P
标识提供商核心 (P) 路由器CE2
识别客户边缘 2 (CE2) 路由器PE2
标识提供商边缘 2 (PE2) 路由器
要为 图 4 所示网络配置 MBGP 组播 VPN,请执行以下步骤:
配置接口
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
在每个路由器上,在环路逻辑接口 0 ()
lo0.0
上配置 IP 地址。[edit interfaces] user@CE1# set lo0 unit 0 family inet address 192.168.6.1/32 primary user@PE1# set lo0 unit 0 family inet address 192.168.7.1/32 primary user@P# set lo0 unit 0 family inet address 192.168.8.1/32 primary user@PE2# set lo0 unit 0 family inet address 192.168.9.1/32 primary user@CE2# set lo0 unit 0 family inet address 192.168.0.1/32 primary
使用命令验证
show interfaces terse
环路逻辑接口上的 IP 地址是否正确。在 PE 和客户边缘路由器上,在快速以太网接口上配置 IP 地址和协议家族。
inet
指定协议族类型。[edit interfaces] user@CE1# set fe-1/3/0 unit 0 family inet address 10.10.12.1/24 user@CE1# set fe-0/1/0 unit 0 family inet address 10.0.67.13/30 [edit interfaces] user@PE1# set fe-0/1/0 unit 0 family inet address 10.0.67.14/30 [edit interfaces] user@PE2# set fe-0/1/0 unit 0 family inet address 10.0.90.13/30 [edit interfaces] user@CE2# set fe-0/1/0 unit 0 family inet address 10.0.90.14/30 user@CE2# set fe-1/3/0 unit 0 family inet address 10.10.11.1/24
使用命令验证
show interfaces terse
快速以太网接口上的 IP 地址是否正确。在 PE 和 P 路由器上,配置 ATM 接口的 VPI 和最大虚拟电路数。如果直接连接的 ATM 接口上的默认 PIC 类型不同,请将 PIC 类型配置为相同。配置逻辑接口 VCI、协议系列、本地 IP 地址和目标 IP 地址。
[edit interfaces] user@PE1# set at-0/2/0 atm-options pic-type atm1 user@PE1# set at-0/2/0 atm-options vpi 0 maximum-vcs 256 user@PE1# set at-0/2/0 unit 0 vci 0.128 user@PE1# set at-0/2/0 unit 0 family inet address 10.0.78.5/32 destination 10.0.78.6 [edit interfaces] user@P# set at-0/2/0 atm-options pic-type atm1 user@P# set at-0/2/0 atm-options vpi 0 maximum-vcs 256 user@P# set at-0/2/0 unit 0 vci 0.128 user@P# set at-0/2/0 unit 0 family inet address 10.0.78.6/32 destination 10.0.78.5 user@P# set at-0/2/1 atm-options pic-type atm1 user@P# set at-0/2/1 atm-options vpi 0 maximum-vcs 256 user@P# set at-0/2/1 unit 0 vci 0.128 user@P# set at-0/2/1 unit 0 family inet address 10.0.89.5/32 destination 10.0.89.6 [edit interfaces] user@PE2# set at-0/2/1 atm-options pic-type atm1 user@PE2# set at-0/2/1 atm-options vpi 0 maximum-vcs 256 user@PE2# set at-0/2/1 unit 0 vci 0.128 user@PE2# set at-0/2/1 unit 0 family inet address 10.0.89.6/32 destination 10.0.89.5
使用命令验证
show configuration interfaces
ATM 接口的 VPI 和最大 VC 数是否正确,以及逻辑接口 VCI、协议系列、本地 IP 地址和目标 IP 地址是否正确。
配置 OSPF
分步过程
在 P 和 PE 路由器上,配置 OSPF 的提供商实例。
lo0.0
指定面向 ATM 核心的逻辑接口。PE 路由器上的 OSPF 提供商实例与其他 PE 路由器和路由器 P 上的 OSPF 邻居形成邻接关系。user@PE1# set protocols ospf area 0.0.0.0 interface at-0/2/0.0 user@PE1# set protocols ospf area 0.0.0.0 interface lo0.0 user@P# set protocols ospf area 0.0.0.0 interface lo0.0 user@P# set protocols ospf area 0.0.0.0 interface all user@P# set protocols ospf area 0.0.0.0 interface fxp0 disable user@PE2# set protocols ospf area 0.0.0.0 interface lo0.0 user@PE2# set protocols ospf area 0.0.0.0 interface at-0/2/1.0
使用命令
lo0.0
验证show ospf interfaces
是否为 OSPF 配置了面向 ATM 核心的逻辑接口。在客户边缘路由器上,配置 OSPF 的客户实例。指定环路和快速以太网逻辑接口。客户边缘路由器上的 OSPF 客户实例与 PE 路由器上 OSPF 的 VPN 路由实例内的邻接方形成邻接关系。
user@CE1# set protocols ospf area 0.0.0.0 interface fe-0/1/0.0 user@CE1# set protocols ospf area 0.0.0.0 interface fe-1/3/0.0 user@CE1# set protocols ospf area 0.0.0.0 interface lo0.0 user@CE2# set protocols ospf area 0.0.0.0 interface fe-0/1/0.0 user@CE2# set protocols ospf area 0.0.0.0 interface fe-1/3/0.0 user@CE2# set protocols ospf area 0.0.0.0 interface lo0.0
使用命令验证
show ospf interfaces
是否已将正确的环路和快速以太网逻辑接口添加到 OSPF 协议中。在 P 和 PE 路由器上,为 OSPF 的提供者实例配置 OSPF 流量工程支持。
该
shortcuts
语句使 OSPF 的主实例能够使用标签交换路径作为下一跃点。user@PE1# set protocols ospf traffic-engineering shortcuts user@P# set protocols ospf traffic-engineering shortcuts user@PE2# set protocols ospf traffic-engineering shortcuts
使用 or
show ospf overview
show configuration protocols ospf
命令验证是否启用了信息流工程支持。
配置 BGP
分步过程
在路由器 P 上,为 VPN 配置 BGP。本地地址是本地
lo0.0
地址。邻居地址是 PE 路由器的lo0.0
地址。该
unicast
语句使路由器能够使用 BGP 通告网络层可达性信息 (NLRI)。该signaling
语句使路由器能够使用 BGP 作为 VPN 的信令协议。user@P# set protocols bgp group group-mvpn type internal user@P# set protocols bgp group group-mvpn local-address 192.168.8.1 user@P# set protocols bgp group group-mvpn family inet unicast user@P# set protocols bgp group group-mvpn family inet-mvpn signaling user@P# set protocols bgp group group-mvpn neighbor 192.168.9.1 user@P# set protocols bgp group group-mvpn neighbor 192.168.7.1
使用命令验证
show configuration protocols bgp
路由器是否已配置为使用 BGP 通告 NLRI。在 PE 和 P 路由器上,配置 BGP 本地自治系统编号。
user@PE1# set routing-options autonomous-system 0.65010 user@P# set routing-options autonomous-system 0.65010 user@PE2# set routing-options autonomous-system 0.65010
使用命令验证
show configuration routing-options
BGP 本地自治系统编号是否正确。在 PE 路由器上,为 VPN 配置 BGP。将本地地址配置为本地
lo0.0
地址。邻居地址是lo0.0
路由器 P 和其他 PE 路由器 PE2 的地址。user@PE1# set protocols bgp group group-mvpn type internal user@PE1# set protocols bgp group group-mvpn local-address 192.168.7.1 user@PE1# set protocols bgp group group-mvpn family inet-vpn unicast user@PE1# set protocols bgp group group-mvpn family inet-mvpn signaling user@PE1# set protocols bgp group group-mvpn neighbor 192.168.9.1 user@PE1# set protocols bgp group group-mvpn neighbor 192.168.8.1 user@PE2# set protocols bgp group group-mvpn type internal user@PE2# set protocols bgp group group-mvpn local-address 192.168.9.1 user@PE2# set protocols bgp group group-mvpn family inet-vpn unicast user@PE2# set protocols bgp group group-mvpn family inet-mvpn signaling user@PE2# set protocols bgp group group-mvpn neighbor 192.168.7.1 user@PE2# set protocols bgp group group-mvpn neighbor 192.168.8.1
使用
show bgp group
命令验证 BGP 配置是否正确。在 PE 路由器上,配置策略以将 BGP 路由导出到 OSPF。
user@PE1# set policy-options policy-statement bgp-to-ospf from protocol bgp user@PE1# set policy-options policy-statement bgp-to-ospf then accept user@PE2# set policy-options policy-statement bgp-to-ospf from protocol bgp user@PE2# set policy-options policy-statement bgp-to-ospf then accept
使用
show policy bgp-to-ospf
命令验证策略是否正确。
配置 RSVP
分步过程
在 PE 路由器上,在参与 LSP 的接口上启用 RSVP。配置快速以太网和 ATM 逻辑接口。
user@PE1# set protocols rsvp interface fe-0/1/0.0 user@PE1# set protocols rsvp interface at-0/2/0.0 user@PE2# set protocols rsvp interface fe-0/1/0.0 user@PE2# set protocols rsvp interface at-0/2/1.0
在路由器 P 上,在参与 LSP 的接口上启用 RSVP。配置 ATM 逻辑接口。
user@P# set protocols rsvp interface at-0/2/0.0 user@P# set protocols rsvp interface at-0/2/1.0
使用
show configuration protocols rsvp
命令验证 RSVP 配置是否正确。
配置 MPLS
分步过程
在 PE 路由器上,将 MPLS LSP 配置为作为 LSP 出口点的 PE 路由器。指定 LSP 另一端路由器上接口的
lo0.0
IP 地址。在 ATM、快速以太网和lo0.0
接口上配置 MPLS。为了在故障排除时帮助识别每个 LSP,请在每个 PE 路由器上配置不同的 LSP 名称。在此示例中,我们将名称
to-pe2
用作在 PE1 上配置的 LSP 的名称,并to-pe1
用作在 PE2 上配置的 LSP 的名称。user@PE1# set protocols mpls label-switched-path to-pe2 to 192.168.9.1 user@PE1# set protocols mpls interface fe-0/1/0.0 user@PE1# set protocols mpls interface at-0/2/0.0 user@PE1# set protocols mpls interface lo0.0 user@PE2# set protocols mpls label-switched-path to-pe1 to 192.168.7.1 user@PE2# set protocols mpls interface fe-0/1/0.0 user@PE2# set protocols mpls interface at-0/2/1.0 user@PE2# set protocols mpls interface lo0.0
show configuration protocols mpls
使用和show route label-switched-path to-pe1
命令验证 MPLS 和 LSP 配置是否正确。提交配置后,使用 和
show mpls lsp name to-pe1
show mpls lsp name to-pe2
命令验证 LSP 是否正常运行。在路由器 P 上,启用 MPLS。指定连接到 PE 路由器的 ATM 接口。
user@P# set protocols mpls interface at-0/2/0.0 user@P# set protocols mpls interface at-0/2/1.0
使用命令验证
show mpls interface
ATM 接口上是否启用了 MPLS。在 PE 和 P 路由器上,在与 LSP 关联的 ATM 接口上配置协议家族。
mpls
指定协议族类型。user@PE1# set interfaces at-0/2/0 unit 0 family mpls user@P# set interfaces at-0/2/0 unit 0 family mpls user@P# set interfaces at-0/2/1 unit 0 family mpls user@PE2# set interfaces at-0/2/1 unit 0 family mpls
使用命令验证
show mpls interface
是否在与 LSP 关联的 ATM 接口上启用了 MPLS 协议家族。
配置 VRF 路由实例
分步过程
在 PE 路由器上,为 VPN 配置路由实例并指定
vrf
实例类型。添加快速以太网和lo0.1
面向客户的接口。配置 OSPF 的 VPN 实例,并包括 BGP 到 OSPF 导出策略。user@PE1# set routing-instances vpn-a instance-type vrf user@PE1# set routing-instances vpn-a interface lo0.1 user@PE1# set routing-instances vpn-a interface fe-0/1/0.0 user@PE1# set routing-instances vpn-a protocols ospf export bgp-to-ospf user@PE1# set routing-instances vpn-a protocols ospf area 0.0.0.0 interface all user@PE2# set routing-instances vpn-a instance-type vrf user@PE2# set routing-instances vpn-a interface lo0.1 user@PE2# set routing-instances vpn-a interface fe-0/1/0.0 user@PE2# set routing-instances vpn-a protocols ospf export bgp-to-ospf user@PE2# set routing-instances vpn-a protocols ospf area 0.0.0.0 interface all
使用命令验证
show configuration routing-instances vpn-a
路由实例配置是否正确。在 PE 路由器上,为路由实例配置路由识别符。路由识别符允许路由器区分用作 VPN 路由的两个相同 IP 前缀。在每个 PE 路由器上配置不同的路由识别符。此示例在 PE1 上使用 65010:1,在 PE2 上使用 65010:2。
user@PE1# set routing-instances vpn-a route-distinguisher 65010:1 user@PE2# set routing-instances vpn-a route-distinguisher 65010:2
使用
show configuration routing-instances vpn-a
命令验证路由识别符是否正确。在 PE 路由器上,配置默认 VRF 导入和导出策略。基于此配置,BGP 会自动生成与 VRF 导入策略中引用的路由目标对应的本地路由。此示例使用 2:1 作为路由目标。
注意:您必须在每个 PE 路由器上为给定的 VPN 路由实例配置相同的路由目标。
user@PE1# set routing-instances vpn-a vrf-target target:2:1 user@PE2# set routing-instances vpn-a vrf-target target:2:1
使用
show configuration routing-instances vpn-a
命令验证路由目标是否正确。在 PE 路由器上,配置 VPN 路由实例以支持组播。
user@PE1# set routing-instances vpn-a protocols mvpn user@PE2# set routing-instances vpn-a protocols mvpn
使用命令验证
show configuration routing-instance vpn-a
是否已将 VPN 路由实例配置为支持组播。在 PE 路由器上,在客户路由实例 VPN 中使用的环路逻辑接口 1 (
lo0.1
) 上配置 IP 地址。user@PE1# set interfaces lo0 unit 1 family inet address 10.10.47.101/32 user@PE2# set interfaces lo0 unit 1 family inet address 10.10.47.100/32
使用命令验证
show interfaces terse
环路接口上的 IP 地址是否正确。
配置 PIM
分步过程
在 PE 路由器上,启用 PIM。
lo0.1
配置 和面向客户的快速以太网接口。将模式指定为 ,将版本sparse
2
指定为 。user@PE1# set routing-instances vpn-a protocols pim interface lo0.1 mode sparse user@PE1# set routing-instances vpn-a protocols pim interface lo0.1 version 2 user@PE1# set routing-instances vpn-a protocols pim interface fe-0/1/0.0 mode sparse user@PE1# set routing-instances vpn-a protocols pim interface fe-0/1/0.0 version 2 user@PE2# set routing-instances vpn-a protocols pim interface lo0.1 mode sparse user@PE2# set routing-instances vpn-a protocols pim interface lo0.1 version 2 user@PE2# set routing-instances vpn-a protocols pim interface fe-0/1/0.0 mode sparse user@PE2# set routing-instances vpn-a protocols pim interface fe-0/1/0.0 version 2
使用命令验证
show pim interfaces instance vpn-a
接口和面向客户的快速以太网接口上是否启用了lo0.1
PIM 稀疏模式。在客户边缘路由器上,启用 PIM。在此示例中,我们将配置所有接口。将模式指定为 ,将版本
sparse
2
指定为 。user@CE1# set protocols pim interface all user@CE2# set protocols pim interface all mode sparse user@CE2# set protocols pim interface all version 2
使用命令验证
show pim interfaces
是否在所有接口上启用了 PIM 稀疏模式。
配置提供程序隧道
分步过程
在路由器 PE1 上,配置提供商隧道。指定要使用的组播地址。
该
provider-tunnel
语句指示路由器通过隧道发送组播流量。user@PE1# set routing-instances vpn-a provider-tunnel rsvp-te label-switched-path-template default-template
使用命令验证
show configuration routing-instance vpn-a
提供程序隧道是否配置为使用默认 LSP 模板。在路由器 PE2 上,配置提供商隧道。指定要使用的组播地址。
user@PE2# set routing-instances vpn-a provider-tunnel rsvp-te label-switched-path-template default-template
使用命令验证
show configuration routing-instance vpn-a
提供程序隧道是否配置为使用默认 LSP 模板。
配置集合点
分步过程
将路由器 PE1 配置为集合点。指定
lo0.1
路由器 PE1 的地址。指定要使用的组播地址。user@PE1# set routing-instances vpn-a protocols pim rp local address 10.10.47.101 user@PE1# set routing-instances vpn-a protocols pim rp local group-ranges 224.1.1.1/32
使用命令验证
show pim rps instance vpn-a
是否为 RP 配置了正确的本地 IP 地址。在路由器 PE2 上,配置静态集合点。指定
lo0.1
路由器 PE1 的地址。user@PE2# set routing-instances vpn-a protocols pim rp static address 10.10.47.101
使用命令验证
show pim rps instance vpn-a
是否为 RP 配置了正确的静态 IP 地址。在客户边缘路由器上,配置静态集合点。指定
lo0.1
路由器 PE1 的地址。user@CE1# set protocols pim rp static address 10.10.47.101 version 2 user@CE2# set protocols pim rp static address 10.10.47.101 version 2
使用命令验证
show pim rps
是否为 RP 配置了正确的静态 IP 地址。使用
commit check
命令验证是否可以成功提交配置。如果配置通过检查,请提交配置。启动连接到 CE1 的组播发送方设备。
启动连接到CE2的组播接收器设备。
验证接收器是否正在接收组播流。
使用
show
命令验证路由、VPN 和组播操作。
结果
此示例的配置和验证部分已完成。以下部分供您参考。
路由器 CE1 的相关配置示例如下。
路由器 CE1
interfaces { lo0 { unit 0 { family inet { address 192.168.6.1/32 { primary; } } } } fe-0/1/0 { unit 0 { family inet { address 10.0.67.13/30; } } } fe-1/3/0 { unit 0 { family inet { address 10.10.12.1/24; } } } } protocols { ospf { area 0.0.0.0 { interface fe-0/1/0.0; interface lo0.0; interface fe-1/3/0.0; } } pim { rp { static { address 10.10.47.101 { version 2; } } } interface all; } }
路由器 PE1 的相关配置示例如下。
路由器 PE1
interfaces { lo0 { unit 0 { family inet { address 192.168.7.1/32 { primary; } } } } fe-0/1/0 { unit 0 { family inet { address 10.0.67.14/30; } } } at-0/2/0 { atm-options { pic-type atm1; vpi 0 { maximum-vcs 256; } } unit 0 { vci 0.128; family inet { address 10.0.78.5/32 { destination 10.0.78.6; } } family mpls; } } lo0 { unit 1 { family inet { address 10.10.47.101/32; } } } } routing-options { autonomous-system 0.65010; } protocols { rsvp { interface fe-0/1/0.0; interface at-0/2/0.0; } mpls { label-switched-path to-pe2 { to 192.168.9.1; } interface fe-0/1/0.0; interface at-0/2/0.0; interface lo0.0; } bgp { group group-mvpn { type internal; local-address 192.168.7.1; family inet-vpn { unicast; } family inet-mvpn { signaling; } neighbor 192.168.9.1; neighbor 192.168.8.1; } } ospf { traffic-engineering { shortcuts; } area 0.0.0.0 { interface at-0/2/0.0; interface lo0.0; } } } policy-options { policy-statement bgp-to-ospf { from protocol bgp; then accept; } } routing-instances { vpn-a { instance-type vrf; interface lo0.1; interface fe-0/1/0.0; route-distinguisher 65010:1; provider-tunnel { rsvp-te { label-switched-path-template { default-template; } } } vrf-target target:2:1; protocols { ospf { export bgp-to-ospf; area 0.0.0.0 { interface all; } } pim { rp { local { address 10.10.47.101; group-ranges { 224.1.1.1/32; } } } interface lo0.1 { mode sparse; version 2; } interface fe-0/1/0.0 { mode sparse; version 2; } } mvpn; } } }
路由器 P 的相关示例配置如下。
路由器 P
interfaces { lo0 { unit 0 { family inet { address 192.168.8.1/32 { primary; } } } } at-0/2/0 { atm-options { pic-type atm1; vpi 0 { maximum-vcs 256; } } unit 0 { vci 0.128; family inet { address 10.0.78.6/32 { destination 10.0.78.5; } } family mpls; } } at-0/2/1 { atm-options { pic-type atm1; vpi 0 { maximum-vcs 256; } } unit 0 { vci 0.128; family inet { address 10.0.89.5/32 { destination 10.0.89.6; } } family mpls; } } } routing-options { autonomous-system 0.65010; } protocols { rsvp { interface at-0/2/0.0; interface at-0/2/1.0; } mpls { interface at-0/2/0.0; interface at-0/2/1.0; } bgp { group group-mvpn { type internal; local-address 192.168.8.1; family inet { unicast; } family inet-mvpn { signaling; } neighbor 192.168.9.1; neighbor 192.168.7.1; } } ospf { traffic-engineering { shortcuts; } area 0.0.0.0 { interface lo0.0; interface all; interface fxp0.0 { disable; } } } }
下面是路由器 PE2 的相关示例配置。
路由器 PE2
interfaces { lo0 { unit 0 { family inet { address 192.168.9.1/32 { primary; } } } } fe-0/1/0 { unit 0 { family inet { address 10.0.90.13/30; } } } at-0/2/1 { atm-options { pic-type atm1; vpi 0 { maximum-vcs 256; } } unit 0 { vci 0.128; family inet { address 10.0.89.6/32 { destination 10.0.89.5; } } family mpls; } } lo0 { unit 1 { family inet { address 10.10.47.100/32; } } } } routing-options { autonomous-system 0.65010; } protocols { rsvp { interface fe-0/1/0.0; interface at-0/2/1.0; } mpls { label-switched-path to-pe1 { to 192.168.7.1; } interface lo0.0; interface fe-0/1/0.0; interface at-0/2/1.0; } bgp { group group-mvpn { type internal; local-address 192.168.9.1; family inet-vpn { unicast; } family inet-mvpn { signaling; } neighbor 192.168.7.1; neighbor 192.168.8.1; } } ospf { traffic-engineering { shortcuts; } area 0.0.0.0 { interface lo0.0; interface at-0/2/1.0; } } } policy-options { policy-statement bgp-to-ospf { from protocol bgp; then accept; } } routing-instances { vpn-a { instance-type vrf; interface fe-0/1/0.0; interface lo0.1; route-distinguisher 65010:2; provider-tunnel { rsvp-te { label-switched-path-template { default-template; } } } vrf-target target:2:1; protocols { ospf { export bgp-to-ospf; area 0.0.0.0 { interface all; } } pim { rp { static { address 10.10.47.101; } } interface fe-0/1/0.0 { mode sparse; version 2; } interface lo0.1 { mode sparse; version 2; } } mvpn; } } }
路由器 CE2 的相关配置示例如下。
路由器 CE2
interfaces { lo0 { unit 0 { family inet { address 192.168.0.1/32 { primary; } } } } fe-0/1/0 { unit 0 { family inet { address 10.0.90.14/30; } } } fe-1/3/0 { unit 0 { family inet { address 10.10.11.1/24; } family inet6 { address fe80::205:85ff:fe88:ccdb/64; } } } } protocols { ospf { area 0.0.0.0 { interface fe-0/1/0.0; interface lo0.0; interface fe-1/3/0.0; } } pim { rp { static { address 10.10.47.101 { version 2; } } } interface all { mode sparse; version 2; } } }
示例:为 MBGP MVPN 配置 PIM-SSM 提供程序隧道
此示例说明如何为 MBGP MVPN 配置 PIM-SSM 提供程序隧道。该配置使服务提供商能够在核心中传输客户数据。此示例说明如何将 PIM-SSM 隧道配置为包含 PMSI,并使用单播路由首选项作为确定单个转发器的指标(而不是默认指标,即路由导入社区中全局管理员字段中的 IP 地址)。
要求
准备工作:
-
配置路由器接口。请参阅 Junos OS 网络接口库了解路由设备。
-
配置 BGP 到 OSPF 路由策略。请参阅 路由策略、防火墙过滤器和流量监管器用户指南。
概述
当 PE 收到来自 CE 的客户加入或删除消息时,该消息会将特定组播流标识为属于源特定树 (S,G) 或共享树 (*,G)。如果到组播源或 RP 的路由穿过 VPN 主干网,则 PE 需要标识 (S,G) 或 (*,G) 流的上游组播跃点 (UMH)。通常,UMH 由到组播源或 RP 的单播路由确定。
但是,在某些情况下,CE 可能会向 PE 分发一组特殊的路由,这些路由专门用于使用路由导入社区进行上游组播跃点选择。多个路由可能符合条件,PE 需要从符合条件的 UMH 中选择一个转发器。
单个转发器选择的默认指标是路由导入社区中全局管理员字段中的 IP 地址。您可以将路由器配置为使用单播路由首选项来确定单个转发器选择。
此示例包括以下设置。
-
提供程序隧道家族 inet pim-ssm 组地址 — 指定有效的 SSM VPN 组地址。SSM VPN 组地址和源地址由 1 类自动发现路由通告。在收到具有 SSM VPN 组地址和源地址的自动发现路由时,PE 路由器会将提供程序空间中的 (S,G) 加入发送到播发自动发现路由的 PE。所有 PE 路由器交换其 PIM-SSM VPN 组地址,以完成非独占提供商组播服务接口 (I-PMSI)。与 PIM-ASM 提供商隧道不同,PE 路由器可以选择不同的 VPN 组地址,因为 (S,G) 加入将直接发送到源 PE。
注意:与 PIM-ASM 提供程序隧道类似,必须在默认主实例中配置 PIM。
-
单播 umh 选择 — 指定 PE 路由器使用单播路由首选项来确定单转发器选择。
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,然后将命令复制并粘贴到层次结构级别的 CLI [edit]
中。
set interfaces fe-0/2/0 unit 0 family inet address 192.168.195.109/30 set interfaces fe-0/2/1 unit 0 family inet address 192.168.195.5/27 set interfaces fe-0/2/2 unit 0 family inet address 10.20.1.1/30 set interfaces fe-0/2/2 unit 0 family iso set interfaces fe-0/2/2 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.10.47.100/32 set interfaces lo0 unit 1 family inet address 192.168.195.1/32 primary set interfaces lo0 unit 2 family inet address 10.10.48.100/32 set protocols mpls interface all set protocols bgp group ibgp type internal set protocols bgp group ibgp local-preference 120 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 10.255.112.155 set protocols isis level 1 disable set protocols isis interface all set protocols isis interface fxp0.0 disable 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 protocols ldp interface all set protocols pim rp static address 10.255.112.155 set protocols pim interface all mode sparse-dense set protocols pim interface all version 2 set protocols pim interface fxp0.0 disable set routing-instances VPN-A instance-type vrf set routing-instances VPN-A interface fe-0/2/1.0 set routing-instances VPN-A interface lo0.1 set routing-instances VPN-A route-distinguisher 10.255.112.199:100 set routing-instances VPN-A provider-tunnel family inet pim-ssm group-address 233.252.0.1 set routing-instances VPN-A vrf-target target:10:100 set routing-instances VPN-A vrf-table-label set routing-instances VPN-A routing-options auto-export set routing-instances VPN-A protocols ospf export bgp-to-ospf set routing-instances VPN-A protocols ospf area 0.0.0.0 interface lo0.1 set routing-instances VPN-A protocols ospf area 0.0.0.0 interface fe-0/2/1.0 set routing-instances VPN-A protocols pim rp static address 10.10.47.101 set routing-instances VPN-A protocols pim interface lo0.1 mode sparse-dense set routing-instances VPN-A protocols pim interface lo0.1 version 2 set routing-instances VPN-A protocols pim interface fe-0/2/1.0 mode sparse-dense set routing-instances VPN-A protocols pim interface fe-0/2/1.0 version 2 set routing-instances VPN-A protocols mvpn unicast-umh-election set routing-instances VPN-B instance-type vrf set routing-instances VPN-B interface fe-0/2/0.0 set routing-instances VPN-B interface lo0.2 set routing-instances VPN-B route-distinguisher 10.255.112.199:200 set routing-instances VPN-B provider-tunnel family inet pim-ssm group-address 233.252.0.2 set routing-instances VPN-B vrf-target target:10:200 set routing-instances VPN-B vrf-table-label set routing-instances VPN-B routing-options auto-export set routing-instances VPN-B protocols ospf export bgp-to-ospf set routing-instances VPN-B protocols ospf area 0.0.0.0 interface lo0.2 set routing-instances VPN-B protocols ospf area 0.0.0.0 interface fe-0/2/0.0 set routing-instances VPN-B protocols pim rp static address 10.10.48.101 set routing-instances VPN-B protocols pim interface lo0.2 mode sparse-dense set routing-instances VPN-B protocols pim interface lo0.2 version 2 set routing-instances VPN-B protocols pim interface fe-0/2/0.0 mode sparse-dense set routing-instances VPN-B protocols pim interface fe-0/2/0.0 version 2 set routing-instances VPN-B protocols mvpn unicast-umh-election set routing-options autonomous-system 65100
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅《Junos OS CLI 用户指南》中的在配置模式下使用 CLI 编辑器。
要为 MBGP MVPN 配置 PIM-SSM 提供程序隧道,请执行以下操作:
-
在 PE 路由器上的主路由实例中配置接口。此示例显示了一个 PE 路由器的接口。
[edit interfaces] user@host# set fe-0/2/0 unit 0 family inet address 192.168.195.109/30 user@host# set fe-0/2/1 unit 0 family inet address 192.168.195.5/27 user@host# set fe-0/2/2 unit 0 family inet address 10.20.1.1/30 user@host# set fe-0/2/2 unit 0 family iso user@host# set fe-0/2/2 unit 0 family mpls user@host# set lo0 unit 1 family inet address 10.10.47.100/32 user@host# set lo0 unit 2 family inet address 10.10.48.100/32
-
在全局路由选项中配置自治系统编号。这在 MBGP MVPN 中是必需的。
[edit routing-options] user@host# set autonomous-system 65100
-
在 PE 路由器上的主路由实例中配置路由协议。
[edit protocols bgp group ibgp] user@host# set type internal user@host# set family inet-vpn any user@host# set family inet-mvpn signaling user@host# set neighbor 10.255.112.155 [edit protocols isis] user@host# set level 1 disable user@host# set interface all user@host# set interface fxp0.0 disable [edit protocols ospf] user@host# set traffic-engineering user@host# set area 0.0.0.0 interface all user@host# set area 0.0.0.0 interface fxp0.0 disable user@host# set protocols ldp interface all [edit protocols pim] user@host# set rp static address 10.255.112.155 user@host# set interface all mode sparse-dense user@host# set interface all version 2 user@host# set interface fxp0.0 disable
-
配置路由实例 VPN-A。
[edit routing-instances VPN-A] user@host# set instance-type vrf user@host# set interface fe-0/2/1.0 user@host# set interface lo0.1 user@host# set route-distinguisher 10.255.112.199:100 user@host# set provider-tunnel family inet pim-ssm group-address 232.252.0.1 user@host# set vrf-target target:10:100 user@host# set vrf-table-label user@host# set routing-options auto-export user@host# set protocols ospf export bgp-to-ospf user@host# set protocols ospf area 0.0.0.0 interface lo0.1 user@host# set protocols ospf area 0.0.0.0 interface fe-0/2/1.0 user@host# set protocols pim rp static address 10.10.47.101 user@host# set protocols pim interface lo0.1 mode sparse-dense user@host# set protocols pim interface lo0.1 version 2 user@host# set protocols pim interface fe-0/2/1.0 mode sparse-dense user@host# set protocols pim interface fe-0/2/1.0 version 2 user@host# set protocols mvpn unicast-umh-election
-
配置路由实例 VPN-B。
[edit routing-instances VPN-B] user@host# set instance-type vrf user@host# set interface fe-0/2/0.0 user@host# set interface lo0.2 user@host# set route-distinguisher 10.255.112.199:200 user@host# set provider-tunnel family inet pim-ssm group-address 232.252.0.2 user@host# set vrf-target target:10:200 user@host# set vrf-table-label user@host# set routing-options auto-export user@host# set protocols ospf export bgp-to-ospf user@host# set protocols ospf area 0.0.0.0 interface lo0.2 user@host# set protocols ospf area 0.0.0.0 interface fe-0/2/0.0 user@host# set protocols pim rp static address 10.10.48.101 user@host# set protocols pim interface lo0.2 mode sparse-dense user@host# set protocols pim interface lo0.2 version 2 user@host# set protocols pim interface fe-0/2/0.0 mode sparse-dense user@host# set protocols pim interface fe-0/2/0.0 version 2 user@host# set protocols mvpn unicast-umh-election
-
配置拓扑,使到 PE1 播发的源的 BGP 路由具有比到 PE2 播发的源的 BGP 路由更高的优先级。
[edit protocols bgp] user@host# set group ibgp local-preference 120
-
在 PE2 上配置比在 PE1 上更高的主环路地址。这可确保 PE2 成为 MBGP MVPN 单转发器选举的获胜者。
[edit] user@host# set interface lo0 unit 1 family inet address 192.168.195.1/32 primary
-
unicast-umh-election
在 PE3 上配置语句。[edit] user@host# set routing-instances VPN-A protocols mvpn unicast-umh-election user@host# set routing-instances VPN-B protocols mvpn unicast-umh-election
-
如果完成设备配置,请提交配置。
user@host# commit
结果
通过从配置模式输入 show interfaces
、 show protocols
、 show routing-instances
和 show routing-options
命令来确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@host# show interfaces fe-0/2/0 { unit 0 { family inet { address 192.168.195.109/30; } } } fe-0/2/1 { unit 0 { family inet { address 192.168.195.5/27; } } } fe-0/2/2 { unit 0 { family inet { address 10.20.1.1/30; } family iso; family mpls; } } lo0 { unit 1 { family inet { address 10.10.47.100/32; address 192.168.195.1/32 { primary; } } } unit 2 { family inet { address 10.10.48.100/32; } } }
user@host# show protocols mpls { interface all; } bgp { group ibgp { type internal; local-preference 120; family inet-vpn { any; } family inet-mvpn { signaling; } neighbor 10.255.112.155; } } isis { level 1 disable; interface all; interface fxp0.0 { disable; } } ospf { traffic-engineering; area 0.0.0.0 { interface all; interface fxp0.0 { disable; } } } ldp { interface all; } pim { rp { static { address 10.255.112.155; } } interface all { mode sparse-dense; version 2; } interface fxp0.0 { disable; } }
user@host# show routing-instances VPN-A { instance-type vrf; interface fe-0/2/1.0; interface lo0.1; route-distinguisher 10.255.112.199:100; provider-tunnel { family inet pim-ssm { group-address 233.252.0.1; } } vrf-target target:10:100; vrf-table-label; routing-options { auto-export; } protocols { ospf { export bgp-to-ospf; area 0.0.0.0 { interface lo0.1; interface fe-0/2/1.0; } } pim { rp { static { address 10.10.47.101; } } interface lo0.1 { mode sparse-dense; version 2; } interface fe-0/2/1.0 { mode sparse-dense; version 2; } } mvpn { unicast-umh-election; } } } VPN-B { instance-type vrf; interface fe-0/2/0.0; interface lo0.2; route-distinguisher 10.255.112.199:200; provider-tunnel { family inet { pim-ssm { group-address 233.252.0.2; } } vrf-target target:10:200; vrf-table-label; routing-options { auto-export; } protocols { ospf { export bgp-to-ospf; area 0.0.0.0 { interface lo0.2; interface fe-0/2/0.0; } } pim { rp { static { address 10.10.48.101; } } interface lo0.2 { mode sparse-dense; version 2; } interface fe-0/2/0.0 { mode sparse-dense; version 2; } } mvpn { unicast-umh-election; } } }
fe-0/2/0 { unit 0 { family inet { address 192.168.195.109/30; } } } fe-0/2/1 { unit 0 { family inet { address 192.168.195.5/27; } } }
user@host# show routing-options autonomous-system 65100;
验证
要验证配置,请启动接收器和源。PE3 应从本地联接创建类型 7 客户组播路由。验证所有 PE 路由器上的源树客户组播条目。PE3 应选择 PE1 作为朝向源头的上游 PE。PE1 从出口 PE 接收客户组播路由,并将 PSMI 上的数据转发到 PE3。
要确认配置,请运行以下命令:
-
显示路由表 VPN-A.mvpn.0 广泛
-
显示组播路由扩展实例 VPN-A
示例:允许 MBGP MVPN 远程源
此示例说明如何配置允许远程源的 MBGP MVPN,即使上游路由器之间没有 PIM 邻居关系也是如此。
要求
准备工作:
配置路由器接口。请参阅 Junos OS 网络接口库了解路由设备。
配置内部网关协议或静态路由。请参阅 Junos OS 路由协议库了解路由设备。
配置点对多点静态 LSP。请参阅 为 MBGP MVPN 配置点对多点 LSP。
概述
在此示例中,远程客户边缘路由器是组播源。在 MBGP MVPN 中,PE 路由器的 PIM 接口你好间隔设置为零,因此不会创建 PIM 邻居关系。PIM 上游状态为“无”。在这种情况下,仅当您将入口 PE 的上游逻辑接口配置为接受远程源时,直接连接的接收器才会接收 MBGP MVPN 中的流量。如果未将入口 PE 的逻辑接口配置为接受远程源,则会删除组播路由,并且本地接收器不再连接到泛洪下一跃点。
此示例显示了入口 PE 路由器上的配置。静态 LSP 用于接收来自远程源的流量。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,然后将命令复制并粘贴到层次结构级别的 CLI [edit]
中。
set routing-instances vpn-A instance-type vrf set routing-instances vpn-A interface ge-1/0/0.213 set routing-instances vpn-A interface ge-1/0/0.484 set routing-instances vpn-A interface ge-1/0/1.200 set routing-instances vpn-A interface ge-1/0/2.0 set routing-instances vpn-A interface ge-1/0/7.0 set routing-instances vpn-A interface vt-1/1/0.0 set routing-instances vpn-A route-distinguisher 10.0.0.10:04 set routing-instances vpn-A provider-tunnel rsvp-te label-switched-path-template mvpn-dynamic set routing-instances vpn-A provider-tunnel selective group 224.0.9.0/32 source 10.1.1.2/32 rsvp-te static-lsp mvpn-static set routing-instances vpn-A vrf-target target:65000:04 set routing-instances vpn-A protocols bgp group 1a type external set routing-instances vpn-A protocols bgp group 1a peer-as 65213 set routing-instances vpn-A protocols bgp group 1a neighbor 10.2.213.9 set routing-instances vpn-A protocols pim interface all hello-interval 0 set routing-instances vpn-A protocols pim interface ge-1/0/2.0 accept-remote-source set routing-instances vpn-A protocols mvpn set routing-options autonomous-system 100
程序
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅《Junos OS CLI 用户指南》中的在配置模式下使用 CLI 编辑器。
要允许远程源:
在入口 PE 路由器上,配置路由实例中的接口。
[edit routing-instances vpn-A] user@host# set instance-type vrf user@host# set interface ge-1/0/0.213 user@host# set interface ge-1/0/0.484 user@host# set interface ge-1/0/1.200 user@host# set interface ge-1/0/2.0 user@host# set interface ge-1/0/7.0 user@host# set interface vt-1/1/0.0
在全局路由选项中配置自治系统编号。这在 MBGP MVPN 中是必需的。
user@host# set routing-options autonomous-system 100
配置路由识别符和 VRF 目标。
[edit routing-instances vpn-A] user@host# set route-distinguisher 10.0.0.10:04 user@host# set vrf-target target:65000:04
配置提供程序隧道。
[edit routing-instances vpn-A] user@host# set provider-tunnel rsvp-te label-switched-path-template mvpn-dynamic user@host# set provider-tunnel selective group 224.0.9.0/32 source 10.1.1.2/32 rsvp-te static-lsp mvpn-static
在路由实例中配置 BGP。
[edit routing-instances vpn-A] user@host# set protocols bgp group 1a type external user@host# set protocols bgp group 1a peer-as 65213 user@host# set protocols bgp group 1a neighbor 10.2.213.9
在路由实例中配置 PIM,包括
accept-remote-source
传入逻辑接口上的语句。[edit routing-instances vpn-A] user@host# set protocols pim interface all hello-interval 0 user@host# set protocols pim interface ge-1/0/2.0 accept-remote-source
在路由实例中启用 MVPN 协议。
[edit routing-instances vpn-A] user@host# set protocols mvpn
如果完成设备配置,请提交配置。
user@host# commit
结果
在配置模式下,输入 show routing-instances
和 show routing-options
命令确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@host# show routing-instances routing-instances { vpn-A { instance-type vrf; interface ge-1/0/0.213; interface ge-1/0/0.484; interface ge-1/0/1.200; interface vt-1/1/0.0; interface ge-1/0/2.0; interface ge-1/0/7.0; route-distinguisher 10.0.0.10:04; provider-tunnel { rsvp-te { label-switched-path-template { mvpn-dynamic; } } selective { group 224.0.9.0/32 { source 10.1.1.2/32 { rsvp-te { static-lsp mvpn-static; } } } } } vrf-target target:65000:04; protocols { bgp { group 1a { type external; peer-as 65213; neighbor 10.2.213.9; } } pim { interface all { hello-interval 0; } interface ge-1/0/2.0 { accept-remote-source; } } mvpn; } }
user@host# show routing-options autonomous-system 100;
验证
要验证配置,请运行以下命令:
显示 MPLS LSP P2MP
显示组播路由实例 vpn-A 广泛
显示 mvpn C 组播
显示 pim 加入实例 vpn-A 广泛
显示路由转发表目标 destination
显示路由表 vpn-A.mvpn.0
示例:基于 MBGP MVPN 地址族配置 BGP 路由抖动抑制
此示例说明如何配置具有 BGP 路由抖动抑制的多协议 BGP 组播 VPN(也称为下一代 MVPN)。
要求
此示例使用 Junos OS 12.2 版。Junos OS 12.2 版中引入了对 MBGP MVPN 的 BGP 路由抖动阻尼支持,特别是在地址族的基础上。
概述
BGP 路由抖动阻尼有助于减少在链路间歇性故障时反复撤销和重新播发路由而导致的路由不稳定。
此示例使用默认阻尼参数,并演示了具有三个提供商边缘 (PE) 路由设备、三个客户边缘 (CE) 路由设备和一个提供商 (P) 路由设备的 MBGP MVPN 方案。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改与您的网络配置匹配所需的任何详细信息,然后将命令复制并粘贴到层次结构级别的 CLI [edit]
中。
设备 R1
set interfaces ge-1/2/0 unit 1 family inet address 10.1.1.1/30 set interfaces ge-1/2/0 unit 1 family mpls set interfaces lo0 unit 1 family inet address 172.16.1.1/32 set protocols ospf area 0.0.0.0 interface lo0.1 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.1 set protocols pim rp static address 172.16.100.1 set protocols pim interface all set routing-options router-id 172.16.1.1
设备 R2
set interfaces ge-1/2/0 unit 2 family inet address 10.1.1.2/30 set interfaces ge-1/2/0 unit 2 family mpls set interfaces ge-1/2/1 unit 5 family inet address 10.1.1.5/30 set interfaces ge-1/2/1 unit 5 family mpls set interfaces vt-1/2/0 unit 2 family inet set interfaces lo0 unit 2 family inet address 172.16.1.2/32 set interfaces lo0 unit 102 family inet address 172.16.100.1/32 set protocols mpls interface ge-1/2/1.5 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 172.16.1.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 172.16.1.4 set protocols bgp group ibgp neighbor 172.16.1.5 set protocols ospf area 0.0.0.0 interface lo0.2 passive set protocols ospf area 0.0.0.0 interface ge-1/2/1.5 set protocols ldp interface ge-1/2/1.5 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.2 set routing-instances vpn-1 interface vt-1/2/0.2 set routing-instances vpn-1 interface lo0.102 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.102 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/0.2 set routing-instances vpn-1 protocols pim rp static address 172.16.1.2 with 172.16.4.1100.1 set routing-instances vpn-1 protocols pim interface ge-1/2/0.2 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 172.16.1.2 set routing-options autonomous-system 1001
设备 R3
set interfaces ge-1/2/0 unit 6 family inet address 10.1.1.6/30 set interfaces ge-1/2/0 unit 6 family mpls set interfaces ge-1/2/1 unit 9 family inet address 10.1.1.9/30 set interfaces ge-1/2/1 unit 9 family mpls set interfaces ge-1/2/2 unit 13 family inet address 10.1.1.13/30 set interfaces ge-1/2/2 unit 13 family mpls set interfaces lo0 unit 3 family inet address 172.16.1.3/32 set protocols mpls interface ge-1/2/0.6 set protocols mpls interface ge-1/2/1.9 set protocols mpls interface ge-1/2/2.13 set protocols ospf area 0.0.0.0 interface lo0.3 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.6 set protocols ospf area 0.0.0.0 interface ge-1/2/1.9 set protocols ospf area 0.0.0.0 interface ge-1/2/2.13 set protocols ldp interface ge-1/2/0.6 set protocols ldp interface ge-1/2/1.9 set protocols ldp interface ge-1/2/2.13 set protocols ldp p2mp set routing-options router-id 172.16.1.3
设备 R4
set interfaces ge-1/2/0 unit 10 family inet address 10.1.1.10/30 set interfaces ge-1/2/0 unit 10 family mpls set interfaces ge-1/2/1 unit 17 family inet address 10.1.1.17/30 set interfaces ge-1/2/1 unit 17 family mpls set interfaces vt-1/2/0 unit 4 family inet set interfaces lo0 unit 4 family inet address 172.16.1.4/32 set interfaces lo0 unit 104 family inet address 172.16.100.1/32 set protocols rsvp interface all aggregate set protocols mpls interface all set protocols mpls interface ge-1/2/0.10 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 172.16.1.4 set protocols bgp group ibgp family inet-vpn unicast set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling damping set protocols bgp group ibgp neighbor 172.16.1.2 import dampPolicy set protocols bgp group ibgp neighbor 172.16.1.5 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface lo0.4 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.10 set protocols ldp interface ge-1/2/0.10 set protocols ldp p2mp set policy-options policy-statement dampPolicy term term1 from family inet-mvpn set policy-options policy-statement dampPolicy term term1 from nlri-route-type 3 set policy-options policy-statement dampPolicy term term1 from nlri-route-type 4 set policy-options policy-statement dampPolicy term term1 from nlri-route-type 5 set policy-options policy-statement dampPolicy term term1 then accept set policy-options policy-statement dampPolicy then damping no-damp set policy-options policy-statement dampPolicy then accept set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set policy-options damping no-damp disable set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface vt-1/2/0.4 set routing-instances vpn-1 interface ge-1/2/1.17 set routing-instances vpn-1 interface lo0.104 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.104 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/1.17 set routing-instances vpn-1 protocols pim rp static address 172.16.100.1 set routing-instances vpn-1 protocols pim interface ge-1/2/1.17 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 172.16.1.4 set routing-options autonomous-system 64501
设备 R5
set interfaces ge-1/2/0 unit 14 family inet address 10.1.1.14/30 set interfaces ge-1/2/0 unit 14 family mpls set interfaces ge-1/2/1 unit 21 family inet address 10.1.1.21/30 set interfaces ge-1/2/1 unit 21 family mpls set interfaces vt-1/2/0 unit 5 family inet set interfaces lo0 unit 5 family inet address 172.16.1.5/32 set interfaces lo0 unit 105 family inet address 172.16.100.5/32 set protocols mpls interface ge-1/2/0.14 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 172.16.1.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 172.16.1.2 set protocols bgp group ibgp neighbor 172.16.1.4 set protocols ospf area 0.0.0.0 interface lo0.5 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.14 set protocols ldp interface ge-1/2/0.14 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 set routing-instances vpn-1 interface ge-1/2/1.21 set routing-instances vpn-1 interface lo0.105 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.105 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/1.21 set routing-instances vpn-1 protocols pim rp static address 172.16.100.2 set routing-instances vpn-1 protocols pim interface ge-1/2/1.21 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 172.16.1.5 set routing-options autonomous-system 1001
设备 R6
set interfaces ge-1/2/0 unit 18 family inet address 10.1.1.18/30 set interfaces ge-1/2/0 unit 18 family mpls set interfaces lo0 unit 6 family inet address 172.16.1.6/32 set protocols sap listen 233.1.1.1 set protocols ospf area 0.0.0.0 interface lo0.6 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.18 set protocols pim rp static address 172.16.100.2 set protocols pim interface all set routing-options router-id 172.16.1.6
设备 R7
set interfaces ge-1/2/0 unit 22 family inet address 10.1.1.22/30 set interfaces ge-1/2/0 unit 22 family mpls set interfaces lo0 unit 7 family inet address 172.16.1.7/32 set protocols ospf area 0.0.0.0 interface lo0.7 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.22 set protocols pim rp static address 172.16.100.2 set protocols pim interface all set routing-options router-id 172.16.1.7
配置设备 R4
分步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅《Junos OS CLI 用户指南》中的在配置模式下使用 CLI 编辑器。
要配置设备 R4:
配置接口。
[edit interfaces] user@R4# set ge-1/2/0 unit 10 family inet address 10.1.1.10/30 user@R4# set ge-1/2/0 unit 10 family mpls user@R4# set ge-1/2/1 unit 17 family inet address 10.1.1.17/30 user@R4# set ge-1/2/1 unit 17 family mpls user@R4# set vt-1/2/0 unit 4 family inet user@R4# set lo0 unit 4 family inet address 172.16.1.4/32 user@R4# set lo0 unit 104 family inet address 172.16.100.4/32
在接口上配置 MPLS 和信令协议。
[edit protocols] user@R4# set mpls interface all user@R4# set mpls interface ge-1/2/0.10 user@R4# set rsvp interface all aggregate user@R4# set ldp interface ge-1/2/0.10 user@R4# set ldp p2mp
配置 BGP。
BGP 配置可为地址族启用
inet-mvpn
BGP 路由抖动阻尼。BGP 配置还会将名为 的dampPolicy
路由策略导入到路由表中。此策略应用于邻接方 PE 设备 R2。[edit protocols bgp group ibgp] user@R4# set type internal user@R4# set local-address 172.16.1.4 user@R4# set family inet-vpn unicast user@R4# set family inet-vpn any user@R4# set family inet-mvpn signaling damping user@R4# set neighbor 172.16.1.2 import dampPolicy user@R4# set neighbor 172.16.1.5
配置内部网关协议。
[edit protocols ospf] user@R4# set traffic-engineering [edit protocols ospf area 0.0.0.0] user@R4# set interface all user@R4# set interface lo0.4 passive user@R4# set interface ge-1/2/0.10
配置使用
nlri-route-type
匹配条件的阻尼策略,以仅抑制 MVPN 路由类型 3、4 和 5。[edit policy-options policy-statement dampPolicy term term1] user@R4# set from family inet-mvpn user@R4# set from nlri-route-type 3 user@R4# set from nlri-route-type 4 user@R4# set from nlri-route-type 5 user@R4# set then accept
配置策略以
damping
禁用 BGP 路由抖动抑制。no-damp
策略 (damping no-damp disable
) 会导致删除路由表中存在的任何阻尼状态。该then damping no-damp
语句将no-damp
策略作为操作应用,并且没有from
匹配条件。因此,所有不匹配term1
的路由都将与此术语匹配,结果所有其他 MVPN 路由类型都不会被阻尼。[edit policy-options policy-statement dampPolicy] user@R4# set then damping no-damp user@R4# set then accept [edit policy-options] user@R4# set damping no-damp disable
将 配置为
parent_vpn_routes
接受不属于地址族的inet-mvpn
所有其他 BGP 路由。此策略作为路由实例中的 OSPF 导出策略应用。
[edit policy-options policy-statement parent_vpn_routes] user@R4# set from protocol bgp user@R4# set then accept
配置 VPN 路由和转发 (VRF) 实例。
[edit routing-instances vpn-1] user@R4# set instance-type vrf user@R4# set interface vt-1/2/0.4 user@R4# set interface ge-1/2/1.17 user@R4# set interface lo0.104 user@R4# set route-distinguisher 100:100 user@R4# set vrf-target target:1:1 user@R4# set protocols ospf export parent_vpn_routes user@R4# set protocols ospf area 0.0.0.0 interface lo0.104 passive user@R4# set protocols ospf area 0.0.0.0 interface ge-1/2/1.17 user@R4# set protocols pim rp static address 172.16.100.2 user@R4# set protocols pim interface ge-1/2/1.17 mode sparse user@R4# set protocols mvpn
配置路由器 ID 和自治系统 (AS) 编号。
[edit routing-options] user@R4# set router-id 172.16.1.4 user@R4# set autonomous-system 1001
如果完成设备配置,请提交配置。
user@R4# commit
结果
在配置模式下,输入 show interfaces
、 show protocols
、 show routing-instances
show policy-options
和show routing-options
命令来确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@R4# show interfaces ge-1/2/0 { unit 10 { family inet { address 10.1.1.10/30; } family mpls; } } ge-1/2/1 { unit 17 { family inet { address 10.1.1.17/30; } family mpls; } } vt-1/2/0 { unit 4 { family inet; } } lo0 { unit 4 { family inet { address 172.16.1.4/32; } } unit 104 { family inet { address 172.16.100.4/32; } } }
user@R4# show protocols rsvp { interface all { aggregate; } } mpls { interface all; interface ge-1/2/0.10; } bgp { group ibgp { type internal; local-address 172.16.1.4; family inet-vpn { unicast; any; } family inet-mvpn { signaling { damping; } } neighbor 172.16.1.2 { import dampPolicy; } neighbor 172.16.1.5; } } ospf { traffic-engineering; area 0.0.0.0 { interface all; interface lo0.4 { passive; } interface ge-1/2/0.10; } } ldp { interface ge-1/2/0.10; p2mp; }
user@R4# show policy-options policy-statement dampPolicy { term term1 { from { family inet-mvpn; nlri-route-type [ 3 4 5 ]; } then accept; } then { damping no-damp; accept; } } policy-statement parent_vpn_routes { from protocol bgp; then accept; } damping no-damp { disable; }
user@R4# show routing-instances vpn-1 { instance-type vrf; interface vt-1/2/0.4; interface ge-1/2/1.17; interface lo0.104; route-distinguisher 100:100; vrf-target target:1:1; protocols { ospf { export parent_vpn_routes; area 0.0.0.0 { interface lo0.104 { passive; } interface ge-1/2/1.17; } } pim { rp { static { address 172.16.100.2; } } interface ge-1/2/1.17 { mode sparse; } } mvpn; } }
user@R4# show routing-optons router-id 172.16.1.4; autonomous-system 1001;
验证
确认配置工作正常。
验证是否禁用了路由抖动阻尼
目的
no-damp
验证是否存在该策略,该策略将禁用 3、4 和 5 以外的 MVPN 路由类型的阻尼。
行动
在操作模式下,输入 show policy damping
命令。
user@R4> show policy damping Default damping information: Halflife: 15 minutes Reuse merit: 750 Suppress/cutoff merit: 3000 Maximum suppress time: 60 minutes Computed values: Merit ceiling: 12110 Maximum decay: 6193 Damping information for "no-damp": Damping disabled
意义
输出显示默认阻尼参数已生效, no-damp
并且策略对指定的路由类型也有效。
验证路由抖动阻尼
目的
检查 BGP 路由是否已阻尼。
行动
在操作模式下,输入 show bgp summary
命令。
user@R4> show bgp summary Groups: 1 Peers: 2 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l3vpn.0 6 6 0 0 0 0 bgp.l3vpn.2 0 0 0 0 0 0 bgp.mvpn.0 2 2 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 172.16.1.2 1001 3159 3155 0 0 23:43:47 Establ bgp.l3vpn.0: 3/3/3/0 bgp.l3vpn.2: 0/0/0/0 bgp.mvpn.0: 1/1/1/0 vpn-1.inet.0: 3/3/3/0 vpn-1.mvpn.0: 1/1/1/0 172.16.1.5 1001 3157 3154 0 0 23:43:40 Establ bgp.l3vpn.0: 3/3/3/0 bgp.l3vpn.2: 0/0/0/0 bgp.mvpn.0: 1/1/1/0 vpn-1.inet.0: 3/3/3/0 vpn-1.mvpn.0: 1/1/1/0
意义
“潮湿状态”字段显示 bgp.mvpn.0 路由表中的零路由已被抑制。再往下看,状态字段中的最后一个数字显示 BGP 对等方 172.16.1.2 的路由已阻尼零。
示例:配置 MBGP 组播 VPN 拓扑变体
本节介绍如何使用多协议 BGP (MBGP)(下一代 MVPN)配置组播虚拟专用网络 (MVPN)。
要求
要实施基于 BGP 的多协议组播 VPN、自动 RP、自举路由器 (BSR) RP 和 PIM 密集模式,您需要 JUNOS 9.2 或更高版本。
要实现基于 BGP 的多协议组播 VPN、仅发送方站点和仅接收方站点,您需要 JUNOS 8.4 或更高版本。
概述和拓扑
您可以为下一代组播 VPN 网络配置 PIM 自动 RP、引导路由器 (BSR) RP、PIM 密集模式和 mtrace。自动 RP 使用 PIM 密集模式传播控制消息并建立 RP 映射。您可以在以下三种不同模式之一中配置自动 RP 节点:发现模式、通告模式和映射模式。BSR 是用于建立 RP 的 IETF 标准。网络中选定的路由器充当 BSR,为不同的组范围选择唯一的 RP。BSR 消息使用 PE 路由器之间的数据隧道进行泛洪。启用 PIM 密集模式时,数据包将转发到除传入接口之外的所有接口。与 PIM 稀疏模式不同,在 PIM 稀疏模式下,数据包需要显式联接才能向下传输,而在 PIM 密集模式下,数据包将泛洪到路由实例中的所有路由器。
本节介绍如何使用 MBGP 配置 MVPN。如果您有基于 draft-rosen 的组播 VPN,它们将继续像以前一样工作,并且不受使用 MBGP 的 MVPN 配置的影响。
本节中大多数示例使用的网络配置如图 8 所示。

在图中,两个 VPN(VPN A 和 VPN B)由同一提供商在多个站点提供服务,其中两个站点具有适用于 VPN A 和 VPN B 的客户边缘路由器(未显示站点 2)。PE 路由器与包含路由信息的 VPN 客户边缘的 VRF 表一起显示。请务必注意,网络上的 PE 路由器之间不需要组播协议。组播路由信息由 MBGP 在 PE 路由器之间传输。网络中可能有一个或多个 BGP 路由反射器。两个 VPN 独立运行,并单独配置。
PE 和客户边缘 路由器都运行 PIM 稀疏模式,并维护有关客户源 (C-S) 和客户组 (C-G) 组播组件的转发状态信息。客户边缘路由器仍会将客户的 PIM 加入消息 (PIM C-Join) 从客户边缘发送到 PE,以及从 PE 发送到客户边缘,如图所示。但在提供商的主干网络上,所有组播信息都由 MBGP 承载。除了通常使用的单播 VPN 配置之外,唯一增加的是使用特殊的提供程序隧道(提供程序隧道)在网络上的提供程序节点之间传输 PIM 稀疏模式消息内容。
使用 MBGP 进行 MVPN 配置有几种方案,具体取决于客户站点是具有组播流量的发送方(源)、组播流量的接收方,还是发送方和接收方的混合。MVPN 可以是:
全网状网络(每个 MVPN 站点都有发送方和接收方)
仅发送方和仅接收方站点的混合
仅发送方、仅接收方和发送方-接收方站点的混合
中心辐射型和分支型(中心 PE 和中心 CE 之间的两个接口,所有分支都是发送方-接收方站点)
与提供程序隧道配置相比,每种类型的 MVPN 在配置 VPN 语句上的差异更大。有关配置 VPN 的信息,请参阅 适用于路由设备的 Junos OS VPN 库。
配置全网状 MBGP MVPN
此示例介绍如何配置全网状 MBGP MVPN:
配置步骤
分步过程
在此示例中,PE-1 连接到站点 1 上的 VPN A 和 VPN B,PE-4 连接到站点 4 的 VPN A,PE-2 连接到站点 3 上的 VPN B。要为 VPN A 和 VPN B 配置全网状 MVPN,请执行以下步骤:
配置 PE-1(站点 1 上的 VPN A 和 VPN B):
[edit] routing-instances { VPN-A { instance-type vrf; interface so-6/0/0.0; interface so-6/0/1.0; provider-tunnel { pim-asm { group-address 224.1.1.1; } } protocols { mvpn; } route-distinguisher 65535:0; vrf-target target:1:1; } VPN-B { instance-type vrf; interface ge-0/3/0.0; provider-tunnel { pim-asm { group-address 224.1.1.2; } } protocols { mvpn; } route-distinguisher 65535:1; vrf-target target:1:2; }
配置 PE-4(站点 4 上的 VPN A):
[edit] routing-instances { VPN-A { instance-type vrf; interface so-1/0/0.0; provider-tunnel { pim-asm { group-address 224.1.1.1; } } protocols { mvpn; } route-distinguisher 65535:4; vrf-target target:1:1; }
配置 PE-2(站点 3 上的 VPN B):
[edit] routing-instances { VPN-B { instance-type vrf; interface ge-1/3/0.0; provider-tunnel { pim-asm { group-address 224.1.1.2; } } protocols { mvpn; } route-distinguisher 65535:3; vrf-target target:1:2; }
使用 PIM ASM 提供程序隧道配置仅发送方和仅接收方站点
此示例介绍如何使用 PIM-ASM 提供程序隧道将仅发送方和仅接收方站点混合配置 MBGP MVPN。
配置步骤
分步过程
在此示例中,PE-1 连接到站点 1 的 VPN A(仅限发件人)和 VPN B(仅限接收方),PE-4 连接到站点 4 的 VPN A(仅限接收方),PE-2 连接到站点 3 上的 VPN A(仅限接收方)和 VPN B(仅限发送方)。
要在VPN A和VPN B上为仅发送方和仅接收方站点的混合配置MVPN,请执行以下步骤:
配置 PE-1(站点 1 上仅支持 VPN A 发送方,VPN B 仅接收方):
[edit] routing-instances { VPN-A { instance-type vrf; interface so-6/0/0.0; interface so-6/0/1.0; provider-tunnel { pim-asm { group-address 224.1.1.1; } } protocols { mvpn { sender-site; route-target { export-target unicast; import-target target target:1:4; } } } route-distinguisher 65535:0; vrf-target target:1:1; routing-options { auto-export; } } VPN-B { instance-type vrf; interface ge-0/3/0.0; provider-tunnel { pim-asm { group-address 224.1.1.2; } } protocols { mvpn { receiver-site; route-target { export-target target target:1:5; import-target unicast; } } } route-distinguisher 65535:1; vrf-target target:1:2; routing-options { auto-export; } }
配置 PE-4(站点 4 上仅供 VPN A 接收器使用):
[edit] routing-instances { VPN-A { instance-type vrf; interface so-1/0/0.0; provider-tunnel { pim-asm { group-address 224.1.1.1; } } protocols { mvpn { receiver-site; route-target { export-target target target:1:4; import-target unicast; } } } route-distinguisher 65535:2; vrf-target target:1:1; routing-options { auto-export; } }
配置 PE-2(站点 3 上仅支持 VPN A 接收器,VPN B 仅发送方):
[edit] routing-instances { VPN-A { instance-type vrf; interface so-2/0/1.0; provider-tunnel { pim-asm { group-address 224.1.1.1; } } protocols { mvpn { receiver-site; route-target { export-target target target:1:4; import-target unicast; } } } route-distinguisher 65535:3; vrf-target target:1:1; routing-options { auto-export; } } VPN-B { instance-type vrf; interface ge–1/3/0.0; provider-tunnel { pim-asm { group-address 224.1.1.2; } } protocols { mvpn { sender-site; route-target { export-target unicast import-target target target:1:5; } } } route-distinguisher 65535:4; vrf-target target:1:2; routing-options { auto-export; } }
配置仅发送方、仅接收方和发送方-接收方 MVPN 站点
此示例介绍如何使用仅发送方、仅接收方和发送方-接收方站点的组合配置 MBGP MVPN。
配置步骤
分步过程
在此示例中,PE-1 连接到站点 1 的 VPN A(发送方-接收方)和 VPN B(仅限接收方),PE-4 连接到站点 4 的 VPN A(仅限接收方),PE-2 连接到站点 3 上的 VPN A(仅限发送方)和 VPN B(仅限发送方)。要为 VPN A 和 VPN B 的仅发送方、仅接收方和发送方-接收方站点的组合配置 MVPN,请执行以下步骤:
配置 PE-1(站点 1 上仅支持 VPN A 发送方-接收方和 VPN B 接收方):
[edit] routing-instances { VPN-A { instance-type vrf; interface so-6/0/0.0; interface so-6/0/1.0; provider-tunnel { pim-asm { group-address 224.1.1.1; } } protocols { mvpn { route-target { export-target unicast target target:1:4; import-target unicast target target:1:4 receiver; } } } route-distinguisher 65535:0; vrf-target target:1:1; routing-options { auto-export; } } VPN-B { instance-type vrf; interface ge-0/3/0.0; provider-tunnel { pim-asm { group-address 224.1.1.2; } } protocols { mvpn { receiver-site; route-target { export-target target target:1:5; import-target unicast; } } } route-distinguisher 65535:1; vrf-target target:1:2; routing-options { auto-export; } }
配置 PE-4(站点 4 上仅供 VPN A 接收器使用):
[edit] routing-instances { VPN-A { instance-type vrf; interface so-1/0/0.0; provider-tunnel { pim-asm { group-address 224.1.1.1; } } protocols { mvpn { receiver-site; route-target { export-target target target:1:4; import-target unicast; } } } route-distinguisher 65535:2; vrf-target target:1:1; routing-options { auto-export; } }
配置 PE-2(站点 3 上仅支持 VPN-A 发送程序和 VPN-B 仅发送程序):
[edit] routing-instances { VPN-A { instance-type vrf; interface so-2/0/1.0; provider-tunnel { pim-asm { group-address 224.1.1.1; } } protocols { mvpn { receiver-site; route-target { export-target target target:1:4; import-target unicast; } } } route-distinguisher 65535:3; vrf-target target:1:1; routing-options { auto-export; } } VPN-B { instance-type vrf; interface ge-1/3/0.0; provider-tunnel { pim-asm { group-address 224.1.1.2; } } protocols { mvpn { sender-site; route-target { export-target unicast; import-target target target:1:5; } } } route-distinguisher 65535:4; vrf-target target:1:2; routing-options { auto-export; } }
配置中心辐射型 MVPN
此示例介绍如何在中心辐射型拓扑中配置 MBGP MVPN。
配置步骤
分步过程
在此仅配置 VPN A 的示例中,PE-1 连接到站点 1 的 VPN A(分支站点),PE-4 连接到站点 4 的 VPN A(中心站点),PE-2 连接到站点 3 的 VPN A(分支站点)。当前支持仅限于中心站点 CE 和 PE 之间有两个接口的情况。要为 VPN A 配置中心辐射型 MVPN,请执行以下步骤:
为 VPN A(分支站点)配置 PE-1:
[edit] routing-instances { VPN-A { instance-type vrf; interface so-6/0/0.0; interface so-6/0/1.0; provider-tunnel { rsvp-te { label-switched-path-template { default-template; } } } protocols { mvpn { route-target { export-target unicast; import-target unicast target target:1:4; } } } route-distinguisher 65535:0; vrf-target { import target:1:1; export target:1:3; } routing-options { auto-export; } }
为 VPN A 配置 PE-4(中心站点):
[edit] routing-instances { VPN-A-spoke-to-hub { instance-type vrf; interface so-1/0/0.0; #receives data and joins from the CE protocols { mvpn { receiver-site; route-target { export-target target target:1:4; import-target unicast; } } ospf { export redistribute-vpn; #redistributes VPN routes to CE area 0.0.0.0 { interface so-1/0/0; } } } route-distinguisher 65535:2; vrf-target { import target:1:3; } routing-options { auto-export; } } VPN-A-hub-to-spoke { instance-type vrf; interface so-2/0/0.0; #receives data and joins from the CE provider-tunnel { rsvp-te { label-switched-path-template { default-template; } } } protocols { mvpn { sender-site; route-target { import-target target target:1:3; export-target unicast; } } ospf { export redistribute-vpn; #redistributes VPN routes to CE area 0.0.0.0 { interface so-2/0/0; } } } route-distinguisher 65535:2; vrf-target { import target:1:1; } routing-options { auto-export; } }
为 VPN A(分支站点)配置 PE-2:
[edit] routing-instances { VPN-A { instance-type vrf; interface so-2/0/1.0; provider-tunnel { rsvp-te { label-switched-path-template { default-template; } } } protocols { mvpn { route–target { import-target target target:1:4; export-target unicast; } } } route-distinguisher 65535:3; vrf-target { import target:1:1; export target:1:3; } routing-options { auto-export; } }
为 BGP 组播 VPN 配置不间断活动路由
BGP 组播虚拟专用网络 (MVPN) 是一种第 3 层 VPN 应用,建立在各种单播和组播路由协议(如协议无关组播 (PIM)、BGP、RSVP 和 LDP)之上。要为 BGP MVPN 启用不间断活动路由 (NSR),需要为所有这些协议启用 NSR 支持。
准备工作:
配置路由器接口。请参阅 接口基础知识。
配置内部网关协议或静态路由。请参阅 Junos OS 路由协议库。
要使此功能与 IPv6 配合使用,路由设备必须运行 Junos OS 10.4 或更高版本。
MVPN 维护的状态包括 MVPN 路由、cmcast、提供商隧道和转发信息。BGP MVPN NSR 在主路由引擎和备份路由引擎之间同步此 MVPN 状态。虽然备份路由引擎上的某些状态是基于配置在本地构建的,但其中大部分状态是基于 MVPN 与之交互的其他协议的触发器构建的。这些协议的触发器又是这些模块执行的状态复制的结果。这包括单播协议的路由更改通知、PIM 的加入和修剪触发器、BGP 的远程 MVPN 路由通知,以及来自 RSVP 和 LDP 的提供程序隧道相关通知。
配置 NSR 和对 BGP MVPN 协议的统一不中断服务软件升级 (ISSU) 支持可提供多种功能,例如各种提供商隧道类型、不同的 MVPN 模式(源树、共享树)和 PIM 功能。因此,在入口 PE 上,会为动态 LSP 打开复制功能。因此,配置 NSR 后,动态 LSP 的状态也会复制到备份路由引擎。在备份路由引擎上解析状态后,RSVP 会向 MVPN 发送所需的通知。
要启用 BGP MVPN NSR 支持, advertise-from-main-vpn-tables
需要在层次结构级别配置 [edit protocols bgp]
配置语句。
不间断活动路由 配置包括两个共享信息的路由引擎,以便在路由引擎故障切换期间路由不会中断。在双路由引擎平台上配置 NSR 时,将在两个路由引擎上复制 PIM 控制状态。
此 PIM 状态信息包括:
邻居关系
联接和修剪信息
RP 集信息
路由和下一跃点之间的同步以及两个路由引擎之间的转发状态
Junos OS 在以下 PIM 场景中支持 NSR:
密集模式
稀疏模式
SSM
静态 RP
自动 RP(仅适用于 IPv4)
引导路由器
非 RP 路由器上的嵌入式 RP(仅适用于 IPv6)
BFD 支持
草案 Rosen 组播 VPN 和 BGP 组播 VPN
策略功能,如邻居策略、引导路由器导出和导入策略、范围策略、流程图和反向路径转发 (RPF) 检查策略
要配置不间断活动路由:
参见
更改历史记录表
功能支持由您使用的平台和版本决定。使用 功能资源管理器 确定您的平台是否支持某个功能。
vrf-table-label
语句允许将内部标签映射到特定的虚拟路由和转发 (VRF)。此映射允许检查出口 VPN 路由器上的封装 IP 报头。对于 SRX 系列防火墙,
vrf-table-label
该语句目前仅在物理接口上受支持。解决方法是停用
vrf-table-label
或使用物理接口。