示例:使用 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 路由器配置的接口。请参阅 图 1。互联网组播流量在 IP 路由器之间通过 MPLS 云传输,使用数据平面的入口复制隧道和控制平面使用全网状 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 从该路由器 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 routing-instances
命令以确认show protocols
您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
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