異なるBGPドメイン間でマルチキャスト通信を実現するには、互いのルートを交換しないとRPFによって破棄されてしまいます。ルートの交換方法はIGP, unicast BGPを使う方法の他、multicast BGPを使う方法もあります。
コマンド一覧
このシナリオで重要なコマンド一覧は以下の通りです。
Router(config)# router bgp <as> Router(config-router)# address-family ipv4 multicast Router(config-router-af)# redistribute <protocol> Router(config-router-af)# network <addr> mask <mask> Router(config-router-af)# neighbor <addr> activate
構成図
これ以降の動作確認は、以下の環境で行います。
[ip address]
+--------+ +--------+ +--------+ +--------+
| R1 +--------+ R2 +--------+ R3 +--------+ R4 |
+--------+.1 .2+--------+.2 .3+--------+.3 .4+--------+
e0/0 e0/1 e0/0 e0/1 e0/0 e0/1
192.168.12.0/24 192.168.23.0/24 192.168.34.0/24
R1 Loopback0 R2 Loopback0 R3 Loopback0 R4 Loopback0
10.1.1.1/32 10.2.2.2/32 10.3.3.3/32 10.4.4.4/32
[eigrp domain]
+--------+ +--------+ +--------+ +--------+
| R1 +--------+ R2 + + R3 +--------+ R4 |
+--------+ +--------+ +--------+ +--------+
AS 12 AS 12 AS 34 AS 34
[bgp domain]
+--------+ +--------+ +--------+ +--------+
| R1 +--------+ R2 +--------+ R3 +--------+ R4 |
+--------+ +--------+ +--------+ +--------+
AS 120 AS 120 AS 340 AS 340
[multicast domain]
+--------+ +--------+ +--------+ +--------+
| R1 +--------+ R2 + + R3 +--------+ R4 |
+--------+ +--------+ +--------+ +--------+
BSR Router BSR Router
RP Candidator RP Candidator
[R1] router eigrp 12 network 0.0.0.0 no auto-summary ! router bgp 120 neighbor 10.2.2.2 remote-as 120 neighbor 10.2.2.2 update-source Loopback0 [R2] interface Ethernet0/0 ip pim bsr-border ! router eigrp 12 passive-interface Ethernet0/0 network 0.0.0.0 no auto-summary ! router bgp 120 neighbor 10.1.1.1 remote-as 120 neighbor 10.1.1.1 update-source Loopback0 neighbor 192.168.23.3 remote-as 340 ! ip pim bsr-candidate Loopback0 0 ip pim rp-candidate Loopback0 [R3] router eigrp 34 passive-interface Ethernet0/1 network 0.0.0.0 no auto-summary ! router bgp 340 neighbor 10.4.4.4 remote-as 340 neighbor 10.4.4.4 update-source Loopback0 neighbor 192.168.23.2 remote-as 120 ! ip pim bsr-candidate Loopback0 0 ip pim rp-candidate Loopback0 [R4] router eigrp 34 network 0.0.0.0 no auto-summary ! router bgp 340 neighbor 10.3.3.3 remote-as 340 neighbor 10.3.3.3 update-source Loopback0
設定全文は下記ファイルです。詳細設定は下記を参照ください。
static route
MSDP peer
R2, R3間でMSDP peerを確立します。
[R2] ip msdp peer 192.168.23.3 connect-source Ethernet0/0 remote-as 340 [R3] ip msdp peer 192.168.23.2 connect-source Ethernet0/1 remote-as 120
MSDP peerが確立された事を確認します。
[R2]
R2#show ip msdp peer
MSDP Peer 192.168.23.3 (?), AS 340 (configured AS)
Connection status:
State: Up, Resets: 0, Connection source: Ethernet0/0 (192.168.23.2)
Uptime(Downtime): 00:00:41, Messages sent/received: 1/0
Output messages discarded: 0
Connection and counters cleared 00:01:42 ago
SA Filtering:
Input (S,G) filter: none, route-map: none
Input RP filter: none, route-map: none
Output (S,G) filter: none, route-map: none
Output RP filter: none, route-map: none
SA-Requests:
Input filter: none
Peer ttl threshold: 0
SAs learned from this peer: 0
Input queue size: 0, Output queue size: 0
Message counters:
RPF Failure count: 0
SA Messages in/out: 0/0
SA Requests in: 0
SA Responses out: 0
Data Packets in/out: 0/0
R2#
疎通確認
R1からR4へのpingを送信します。
[R4] interface Loopback0 ip igmp join-group 239.4.4.4 [R1] R1#ping 239.4.4.4 source Loopback 0 repeat 3 Type escape sequence to abort. Sending 3, 100-byte ICMP Echos to 239.4.4.4, timeout is 2 seconds: Packet sent with a source address of 10.1.1.1 ... R1#
pingがどこまで届いているかを確認するためにマルチキャストルーティングテーブルを確認します。R2のOutgoing interface listがNullとなっている事から、R2までしかパケットが届いていない事が分かります。
[R2]
R2#show ip mroute 239.4.4.4
<omitted>
(*, 239.4.4.4), 00:01:15/stopped, RP 10.2.2.2, flags: SP
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list: Null
(10.1.1.1, 239.4.4.4), 00:01:14/00:01:45, flags: PTA
Incoming interface: Ethernet0/1, RPF nbr 192.168.12.1
Outgoing interface list: Null
R2#
[R3]
R3#show ip mroute 239.4.4.4
<omitted>
(*, 239.4.4.4), 00:02:59/00:03:26, RP 10.3.3.3, flags: S
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
Ethernet0/0, Forward/Sparse, 00:02:59/00:03:26
R3#
R2までしか届かない原因として尤もな理由がR3でRPF failureが発生している事です。しかし、SA messageのRPF failureが発生している事を、明確に確認する方法は存在しません。SA messageのRPF failureはdebug ip mpackeでは出力されません。
やや苦し紛れの確認方法を挙げるとすれば、MSDPとPIMのデバッグメッセージを有効にする事です。もしRPF checkに適合しているとすれば、SA message受信の直後にPIM (S, G) joinを送信するはずです。しかし、R3のデバッグ出力を見るとPIM (S, G) joinが送信されていません。PIM (S, G) joinが送信されていない事から、RPF failureが発生したのではないかと推測できます。
[R3] R3#debug ip msdp routes MSDP Routes debugging is on R3# R3#debug ip pim PIM debugging is on R3# R3# *Mar 1 00:02:54.559: MSDP(0): (10.1.1.1/32, 239.4.4.4), accepted R3#
static mrotue
RPF failureが発生しないよう以下のstatic mrouteを追加します。
[R3] ip mroute 10.1.1.1 255.255.255.255 192.168.23.2 [R4] ip mroute 10.1.1.1 255.255.255.255 192.168.34.3
再びR1からR4にpingを送信します。デバッグメッセージからR4までpingが届いている事を確認できます。(なお、ping応答がありませんが、これは正常な動作です。R4はR1へのルートを知らないので、戻りのルートが存在せずping応答がない挙動になります。)
[R1] R1#ping 239.4.4.4 source Loopback 0 repeat 3 Type escape sequence to abort. Sending 3, 100-byte ICMP Echos to 239.4.4.4, timeout is 2 seconds: Packet sent with a source address of 10.1.1.1 ... R1# [R4] R4#debug ip icmp ICMP packet debugging is on R4# *Mar 1 00:21:16.971: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:21:16.975: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:21:19.035: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:21:19.039: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:21:21.023: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:21:21.027: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 R4#
MBGP
仕様説明
ASをまたくマルチキャスト通信を行うにあたり、RPF Failuerが発生する通信に対してstatic mrouteを手作業で入力するのは運用上無理があります。
そこで、MBGPを利用します。MBGPは、RPF checkが使用する情報をBGP経由で伝播し動的なprefixの管理を実現します。MBGP経由でPRF checkに利用する情報を伝播させるには以下のコマンドを使用して下さい。
Router(config)# router bgp <as> Router(config-router)# address-family ipv4 multicast Router(config-router-af)# redistribute <protocol> Router(config-router-af)# network <addr> mask <mask> Router(config-router-af)# neighbor <addr> activate
MBGP 設定
R2, R3が互いが知っているprefixをipv4 multicast routeとして伝播させます。
[R2] router bgp 120 address-family ipv4 multicast redistribute eigrp 12 neighbor 192.168.23.3 activate [R3] router bgp 340 address-family ipv4 multicast redistribute eigrp 34 neighbor 192.168.23.2 activate ! no ip mroute 10.1.1.1 255.255.255.255 192.168.23.2 [R4] no ip mroute 10.1.1.1 255.255.255.255 192.168.34.3
R2, R3が互いにprefixを交換している事を確認します。
[R2]
R2#show bgp ipv4 multicast
BGP table version is 12, local router ID is 10.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.1/32 192.168.12.1 409600 32768 ?
*> 10.2.2.2/32 0.0.0.0 0 32768 ?
*> 10.3.3.3/32 192.168.23.3 0 0 340 ?
*> 10.4.4.4/32 192.168.23.3 409600 0 340 ?
*> 192.168.12.0 0.0.0.0 0 32768 ?
* 192.168.23.0 192.168.23.3 0 0 340 ?
*> 0.0.0.0 0 32768 ?
*> 192.168.34.0 192.168.23.3 0 0 340 ?
R2#
疎通確認
R1からR4にpingを送信します。static mrouteがなくても、R4までpingが届いている事を確認します。
[R1] R1#ping 239.4.4.4 source Loopback 0 repeat 3 Type escape sequence to abort. Sending 3, 100-byte ICMP Echos to 239.4.4.4, timeout is 2 seconds: Packet sent with a source address of 10.1.1.1 ... R1# [R4] R4#debug ip icmp ICMP packet debugging is on R4# *Mar 1 00:29:43.663: IP(0): s=10.1.1.1 (Ethernet0/1) d=239.4.4.4 id=47, ttl=253, prot=1, len=114(100), RPF lookup failed for source *Mar 1 00:29:43.675: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:29:45.627: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:29:45.631: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:29:47.603: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 *Mar 1 00:29:47.607: ICMP: echo reply sent, src 192.168.34.4, dst 10.1.1.1 R4#
