用于 IP 多播路由的 Quagga (Zebra) 多协议 BGP 配置

网络工程 路由 虚拟专用网 bgp 多播 斑驴
2021-07-25 15:00:45
Host A: 
Eth1 = Multicast incoming from upstream provider
OpenVPN_interface_point_A = point to point interface with point B
ASN = 100

Host B: 
OpenVPN_interface_point_B = point to point interface with point A
ASN = 200

如何将特定的多播地址从 Eth1 路由到 OpenVPN_interface_point_B ?

主机 A 和主机 B 都在运行 Quagga BGP 版本 4(我知道我需要更改版本 4+,这在将来不是问题)

概念验证实验室: PoC网络图

路由器A配置:

routerA# show run

Current configuration:
!
password quagga
!
router bgp 1
 bgp router-id 172.24.0.65
 network 172.24.0.64/30
 neighbor 172.24.0.66 remote-as 2
 neighbor 172.24.0.66 soft-reconfiguration inbound
!
 address-family ipv4 multicast
 network 10.101.16.128/27
 neighbor 172.24.0.66 activate
 exit-address-family
!
line vty
!
end

路由器 A BGP 详细信息:

routerA# show ip bgp sum
BGP router identifier 172.24.0.65, local AS number 1
RIB entries 1, using 112 bytes of memory
Peers 1, using 4568 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.24.0.66     4     2      35      43        0    0    0 00:17:28        1

Total number of neighbors 1

routerA# show ip bgp ipv4 multicast 
BGP table version is 0, local router ID is 172.24.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.101.16.128/27 0.0.0.0                  0         32768 i

Total number of prefixes 1

路由器B配置:

routerB# show run

Current configuration:
!
password quagga
!
router bgp 2
 bgp router-id 172.24.0.66
 network 172.24.0.64/30
 neighbor 172.24.0.65 remote-as 1
 neighbor 172.24.0.65 soft-reconfiguration inbound
!
 address-family ipv4 multicast
 neighbor 172.24.0.65 activate
 exit-address-family
!
line vty
!
end

路由器 B 详细信息:

routerB# show ip bgp sum
BGP router identifier 172.24.0.66, local AS number 2
RIB entries 1, using 112 bytes of memory
Peers 1, using 4568 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.24.0.65     4     1      43      47        0    0    0 00:23:55        1

Total number of neighbors 1
routerB# show ip bgp ipv4 multicast 
BGP table version is 0, local router ID is 172.24.0.66
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.101.16.128/27 172.24.0.65              0             0 1 i

Total number of prefixes 1

主机 1 iperf 命令:

iperf -c 225.0.100.100 -u -t 0000 -i 1 -T 10

路由器 B iperf 命令:

iperf -s -u -B 225.0.100.100 -i 1

Router B 仍然收不到组播数据包

2个回答

多播路由与 BGP 等单播路由协议不同。PIM 是多播路由的标准。路径中的每个路由器都必须支持通用的多播路由方案(稀疏、密集或稀疏/密集模式,以及任何必要的 RP),并且这通常不会跨 AS 发生,因为您通常无法控制邻居ASes。

通常,您会创建一条从多播路径一端到路径另一端的 DVMRP 隧道,然后通过该隧道运行多播路由 (PIM)。这不会影响您的 BGP 配置,除了确保您可以通过单播到达隧道的另一端,因为隧道会将您的多播封装在单播数据包中。

在此处输入图片说明

如何将特定的多播地址从 Eth1 路由到 OpenVPN_interface_point_B ?

这是一个可以帮助您入门的配置草图。

Host A 将使用 BGP 向 Host B 发送组播源网络 192.168.0.0/24。

! 1.1.1.1 = Host A
! 1.1.1.2 = Host B

! Host A - partial quagga config for bgpd
router bgp 100
 neighbor 1.1.1.2 remote-as 200
 address-family ipv4 multicast 
  network 192.168.0.0/24 !! replace 192.168.0.0/24 with network for multicast source
  neighbor 1.1.1.2 activate 
 exit-address-family 

! Host B - partial quagga config for bgpd
router bgp 200
 neighbor 1.1.1.1 remote-as 100
 address-family ipv4 multicast 
  neighbor 1.1.1.1 activate 
 exit-address-family