示例:使用 MBGP MVPN 为 IP 组播配置入口复制
要求
此示例中使用的路由器瞻博网络M Series多服务边缘路由器、T Series核心路由器或 MX 系列 5G 通用路由平台。将入口复制用于 IP 组播时,必须为每个参与的路由器配置控制平面过程的 BGP,并为数据提供商隧道配置入口复制,从而形成 MPLS 点对点 LSP 的全网状结构。入口复制隧道可以是选择性的,也可以是包容性的,具体取决于路由实例中提供商隧道的配置。
概述
提供商隧道类型在 ingress-replication 路由器之间使用单播隧道来创建组播分配树。
mpls-internet-multicast路由实例类型使用入口复制提供程序隧道,通过 MPLS 云,使用 MBGP(或新一代)MVPN,在路由器之间传输 IP 组播数据。使用 MVPN 在 PE 路由器之间传输组播数据时,也可以配置入口复制。
mpls-internet-multicast路由实例是仅用于控制平面过程的非转发实例。它不支持任何接口配置。一个逻辑系统只能定义一个mpls-internet-multicast路由实例。用于 IP 组播的所有组播和单播路由仅与默认路由实例 (inet.0) 相关联,而不与配置的路由实例相关联。mpls-internet-multicast路由实例类型是为每个路由器上的默认主实例配置的,并且也包含在默认实例的层次结构级别上[edit protocols pim]。
对于每个mpls-internet-multicast路由实例,语句下provider-tunnel和层次结构级别下[edit routing-instances routing-instance-name provider-tunnel selective group source]都需要该ingress-replication语句。
当需要将新目标添加到入口复制提供程序隧道时,生成的行为会因入口复制提供程序隧道的配置方式而异:
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-multicastIP 组播实例上配置入口复制。此外,此示例还演示如何配置选择性提供程序隧道,以便在每次需要将新目标添加到组播分布树时选择新的单播隧道。
此示例显示边界路由器 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