配置多协议 BGP 组播 VPN
了解基于多协议 BGP 的组播 VPN:下一代
基于 BGP 的多协议组播 VPN(也称为下一代第 3 层 VPN 组播)构成了双组播 VPN(草草玫瑰花)之后的下一次演进,并为希望在第 3 层 VPN 上配置组播的管理员提供更简单的解决方案。
基于多协议 BGP 的组播 VPN 的主要特征是:
他们扩展了第 3 层 VPN 服务 (RFC 2547),以支持第 3 层 VPN 服务提供商的 IP 组播。
它们遵循 RFC 2547 为单播 VPN 指定的相同架构。具体而言,BGP 用作控制平面。
它们消除了对虚拟路由器 (VR) 模型的要求,该型号在 Internet draft draft-rosen-vpn-mcast、 MPLS 中的组播/BGP VPN 中指定,适用于组播 VPN。
它们依靠基于 RFC 的单播,并扩展 AS 内部和 AS 间通信。
基于 BGP 的多协议 VPN 由两组站点定义:一组发送方集和一组接收器。接收方站点集内的主机可接收组播信息流,发送方站点集内的主机可发送组播信息流。站点集可以是接收方和发送方,这意味着此类站点中的主机既可以发送也可接收组播信息流。基于 BGP 的多协议 VPNS 可以跨越组织(因此站点可以是内部网或外部网),可以跨越服务提供商,并且可以重叠。
站点管理员根据客户需求和现有 BGP 和 MPLS VPN 基础架构配置基于 BGP 的多协议 VPN。
MVPN 中的路由反射器行为
基于 BGP 的组播 VPN (MVPN) 客户组播路由由路由反射器聚合。路由反射器 (RR) 可能会从多个提供商边缘 (PE) 路由器接收具有相同 NLRI 的客户组播路由,但 RR 只会重新转换一个此类 NLRI。如果通告此 NLRI 更改的 PE 路由器集,则 RR 不会更新路由。这样可以将路由混乱控制在最低限度。为此,RR 会将下一跳跃设置为自我。此外,RR 会将发起人 ID 设置为自身。如果 RR 收到 RR 已经在播发的 NLRI 的后续客户组播路由,则 RR 可避免不必要的最佳路径计算。这允许使用相同的 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 表查找配置虚拟回传隧道。
MBGP MVPN 的某些外部网配置,带有点对组播 LDP LSP,因为数据平面需要出口 PE 路由器上有一个虚拟回传隧道接口(和隧道 PIC)。当出口 PE 路由器属于多个 MVPN 实例(所有这些实例都需要接收特定组播流)时,则无法使用该
vrf-table-table
语句。在 图 1 中,CE1 和 CE2 路由器属于不同的 MVPN。但是,他们希望接收源发送的组播流。如果语vrf-table-label
句在路由器 PE2 上配置,则数据包不能转发至 CE1 和 CE2。这会导致数据包丢失。如果路由器 PE2 上的两个 MVPN 路由实例中都使用虚拟回传隧道接口,数据包将转发至两个路由器 CE1 和 CE2。因此,如果您使用出口 PE 路由器属于接收特定组播流的多个 MVPN 实例,或者将出口 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 root。后面有客户组播流接收器的 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 内部包容性提供商隧道。
配置包容性提供商隧道时,请如下所示找到 P2MP LSP 根。具有给定 MVPN 接收方站点的 PE 路由器需要发现带有该 MVPN 的发送方站点的 PE 路由器(以及提供商通道信息)的身份。此信息使用由 PE 路由器与发送方站点发起的 AS 内部自动发现路由动态发现。
拓扑
图 2 显示了此示例中使用的拓扑。
在 图 2 中,路由器执行以下功能:
R1 和 R2 是提供商 (P) 路由器。
R0、R3、R4 和 R5 是提供商边缘 (PE) 路由器。
MBGP MVPN 配置在所有 PE 路由器上。
定义了两个 VPN:绿色和红色。
路由器 R0 在单独的路由实例中同时为绿色和红色 CE 路由器提供服务。
路由器 R3 连接到绿色 CE 路由器。
路由器 R5 在单个路由实例中连接到重叠的绿色和红色 CE 路由器。
路由器 R4 在单个路由实例中连接到重叠的绿色和红色 CE 路由器。
OSPF 和多点 LDP (mLDP) 正在核心中运行。
路由器 R1 是路由反射器 (RR),路由器 R2 是冗余 RR。
路由器 R0、R3、R4 和 R5 是客户端内部 BGP (IBGP) 对等方。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,然后将命令复制粘贴到层次结构级别的 [edit]
CLI 中。
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 的数据流量统计信息。
show mvpn 实例, 显示 mvpn 邻接方,并 显示 mvpn c 组播 以显示组播 VPN 路由实例信息,并确保 LDP P2MP LSP 与 MVPN 关联,即 S-PMSI。
显示 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 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,然后将命令复制粘贴到层次结构级别的 [edit]
CLI 中。
边界路由器 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
结果
在配置模式下,发出 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
意义
测试.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
意义
测试.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 和 CE 路由器上,在快速以太网接口上配置 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
使用 命令
show ospf interfaces
验证是否lo0.0
为 OSPF 配置了面向 ATM 核心的逻辑接口。在 CE 路由器上,配置 OSPF 的客户实例。指定回传和快速以太网逻辑接口。CE 路由器上的 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
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
使用 命令验证 MPLS 协议系列是否在与 LSP 关联的 ATM 接口上启用。
配置 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 用作路由目标。
注意:对于给定的 VPN 路由实例,您必须在每个 PE 路由器上配置相同的路由目标。
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 稀疏模式。在 CE 路由器上启用 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 地址。在 CE 路由器上,配置静态汇聚点。
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 的单播路由确定。
但是,在某些情况下,CES 可能会向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 必须在默认主实例中配置。
-
单播-统一选择 — 指定 PE 路由器使用单播路由优先级来确定单转发器选择。
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,然后将命令复制粘贴到层次结构级别的 [edit]
CLI 中。
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
-
在 PE3 上配置
unicast-umh-election
语句。[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。
概述
在此示例中,远程 CE 路由器是组播源。在 MBGP MVPN 中,PE 路由器将 PIM 接口 hello 间隔设置为零,因此不会产生 PIM 邻接。PIM 上游状态为无。在这种情况下,仅当您将入口 PE 的上游逻辑接口配置为接受远程源时,直接连接的接收器才会在 MBGP MVPN 中接收信息流。如果不将入口 PE 的逻辑接口配置为接受远程源,组播路由将被删除,并且本地接收器将不再连接到下一跳跃泛滥。
此示例显示入口 PE 路由器上的配置。静态 LSP 用于接收来自远程源的流量。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,然后将命令复制粘贴到层次结构级别的 [edit]
CLI 中。
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;
验证
要验证配置,请运行以下命令:
show mpls lsp p2mp
显示组播路由实例 vpn-A 广泛
show mvpn c 组播
show pim 加入实例 vpn-A 广泛
显示路由转发表目标 destination
显示路由表 vpn-A.mvpn.0
示例:根据 MBGP MVPN 地址族配置 BGP 路由抖动抑制
此示例说明如何配置具有 BGP 路由抖动衰减的多协议 BGP 组播 VPN(也称为下一代 MVPN)。
要求
此示例使用 Junos OS 版本 12.2。BGP 路由抖动支持 MBGP MVPN,特别是基于地址族,一般在 Junos OS 版本 12.2 中引入。
概述
BGP 路由抖动抑制有助于减少链路间歇性故障时路由反复退出和重新调整导致的路由不稳定性。
此示例使用默认抑制参数并演示了 MBGP MVPN 场景,其中包含三个提供商边缘 (PE) 路由设备、三个客户边缘 (CE) 路由设备和一个提供商 (P) 路由设备。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,然后将命令复制粘贴到层次结构级别的 [edit]
CLI 中。
设备 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 配置使地址族的 BGP 路由抖动衰减
inet-mvpn
。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
为接受并非来自地址族的所有其他 BGP 路由inet-mvpn
。此策略在路由实例中作为 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 policy-options
、 show routing-instances
和 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
,此策略可禁用 MVPN 路由类型(而非 3、4 和 5)的衰减。
行动
在操作模式下,输入 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
意义
Damp State 字段显示 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。使用 PE 路由器之间的数据隧道,BSR 消息被泛滥。启用 PIM 密集模式时,数据包将转发至除传入接口以外的所有接口。与 PIM 稀疏模式不同,在该模式下,数据包需要显式加入才能向下游传输,因此数据包会在 PIM 密集模式下泛滥至路由实例中的所有路由器。
本节向您展示如何使用 MBGP 配置 MVPN。如果您有基于草草玫瑰的组播 VPN,它们将继续工作,并且不受使用 MBGP 的 MVPN 配置的影响。
图 8 中显示了用于本部分大多数示例的网络配置。
在图中,两个 VPN(VPN A 和 VPN B)由同一提供商在多个站点提供服务,其中两个站点有用于 VPN A 和 VPN B 的 CE 路由器(未显示站点 2)。PE 路由器随具有路由信息的 VPN ES 的 VRF 表显示。需要注意的是,网络上的 PE 路由器之间不需要组播协议。组播路由信息由 MBGP 在 PE 路由器之间承载。网络中可能有一个或多个 BGP 路由反射器。两个 VPN 均独立运行并单独配置。
PE 和 CE 路由器均运行 PIM 稀疏模式,并维护有关客户源 (C-S) 和客户组 (C-G) 组播组件的转发状态信息。CE 路由器仍然会将客户的 PIM 加入消息 (PIM C-Join) 从 CE 发送至 PE,从 PE 发送至 CE,如图所示。但是在提供商的主干网络上,所有组播信息都由 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,第 3 站点的 PE-2 连接到 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,请执行以下步骤:
在站点 1 上配置 PE-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 接收器):
[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(仅支持 VPN A 接收器,且仅在站点 3 上为 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,请执行以下步骤:
在站点 1 上配置 PE-1(VPN 发送方接收器和 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 接收器):
[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(仅限 VPN-A 发送方,且仅在站点 3 上为 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 仅配置 VPN A,连接到站点 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 的提供商隧道相关通知。
为 BGP MVPN 协议配置 NSR 和统一不中断服务的软件升级 (ISSU) 支持提供各种提供商隧道类型、不同的 MVPN 模式(源树、共享树)和 PIM 功能等功能。因此,在入口 PE 上,动态 LSP 将启用复制。因此,配置 NSR 时,动态 LSP 的状态也会复制到备份路由引擎。在备份路由引擎上解析状态后,RSVP 会将所需通知发送至 MVPN。
要启用 BGP MVPN NSR 支持, advertise-from-main-vpn-tables
配置语句需要在 [edit protocols bgp]
层次结构级别配置。
不间断活动路由 配置包括两个共享信息的路由引擎,以便路由不会在路由引擎故障切换期间中断。在双路由引擎平台上配置 NSR 时,PIM 控制状态会在两个路由引擎上复制。
此 PIM 状态信息包括:
邻接关系
加入并删除信息
RP 集信息
路由与下一跳跃之间的同步以及两个路由引擎之间的转发状态
在以下 PIM 情景中,Junos OS 支持 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
用或使用物理接口。