基本設定
vIOS4=>vIOS5のマルチキャストへping
vIOS4#ping 239.1.1.5
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 239.1.1.5, timeout is 2 seconds:
Reply to request 0 from 172.16.1.1, 85 ms
show ip mroute
pingを通す前
vIOS3#sh ip igmp group
IGMP Connected Group Membership
Group Address Interface Uptime Expires Last Reporter Group Accounted
239.1.1.5 GigabitEthernet0/0 00:18:34 00:02:31 172.16.1.1
224.0.1.40 GigabitEthernet0/0 00:22:38 00:02:26 172.16.1.254
vIOS3#sh ip mroute
<略>
(*, 239.1.1.5), 00:18:38/00:02:26, RP 2.2.2.2, flags: SJC
Incoming interface: GigabitEthernet0/2, RPF nbr 192.168.4.2
Outgoing interface list:
GigabitEthernet0/0, Forward/Sparse, 00:18:38/00:02:26
(*, 224.0.1.40), 00:22:43/00:02:21, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/0, Forward/Sparse, 00:22:43/00:02:21
vIOS2#sh ip igmp group
IGMP Connected Group Membership
Group Address Interface Uptime Expires Last Reporter Group Accounted
224.0.1.40 GigabitEthernet0/1 00:19:33 00:02:26 192.168.2.2
vIOS2#sh ip mroute
<略>
(*, 239.1.1.5), 00:19:56/00:03:11, RP 2.2.2.2, flags: S
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/2, Forward/Sparse, 00:19:56/00:03:11
(*, 224.0.1.40), 00:24:18/00:02:50, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/1, Forward/Sparse, 00:24:18/00:02:50
vIOS1#sh ip igmp group
IGMP Connected Group Membership
Group Address Interface Uptime Expires Last Reporter Group Accounted
224.0.1.40 GigabitEthernet0/2 00:25:23 00:02:35 192.168.2.2
224.0.1.40 GigabitEthernet0/0 00:31:35 00:02:29 10.1.1.254
vIOS1#sh ip mroute
<略>
(*, 224.0.1.40), 00:31:42/00:02:29, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/0, Forward/Sparse, 00:31:42/00:02:23
ping後
vIOS3#sh ip mroute
<略>
(*, 239.1.1.5), 00:31:42/stopped, RP 2.2.2.2, flags: SJC
Incoming interface: GigabitEthernet0/2, RPF nbr 192.168.4.2
Outgoing interface list:
GigabitEthernet0/0, Forward/Sparse, 00:31:42/00:02:21
(10.1.1.1, 239.1.1.5), 00:09:17/00:01:25, flags: JT
Incoming interface: GigabitEthernet0/1, RPF nbr 192.168.3.1
Outgoing interface list:
GigabitEthernet0/0, Forward/Sparse, 00:09:17/00:02:21
(*, 224.0.1.40), 00:35:47/00:02:20, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/0, Forward/Sparse, 00:35:47/00:02:20
vIOS2#sh ip mroute
<略>
(*, 239.1.1.5), 00:31:22/00:02:34, RP 2.2.2.2, flags: S
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/2, Forward/Sparse, 00:31:22/00:02:34
(10.1.1.1, 239.1.1.5), 00:08:55/00:00:12, flags: PT
Incoming interface: GigabitEthernet0/1, RPF nbr 192.168.2.1
Outgoing interface list: Null
(*, 224.0.1.40), 00:35:44/00:02:27, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/1, Forward/Sparse, 00:35:44/00:02:27
vIOS1#sh ip mroute
<略>
(*, 239.1.1.5), 00:06:59/stopped, RP 2.2.2.2, flags: SPF
Incoming interface: GigabitEthernet0/2, RPF nbr 192.168.2.2
Outgoing interface list: Null
(10.1.1.1, 239.1.1.5), 00:06:59/00:02:37, flags: FT
Incoming interface: GigabitEthernet0/0, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/3, Forward/Sparse, 00:06:59/00:03:24
(*, 224.0.1.40), 00:39:52/00:02:21, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
GigabitEthernet0/0, Forward/Sparse, 00:39:52/00:02:12
・pingを通すことで、マルチキャストルーティングテーブルに送信元が10.1.1.1であるエントリが登録された。
・incomingでどこのI/Fからやってきて、outgoingでどこのI/Fへ転送されていくかが記載されている
パケットキャプチャ
・パケットキャプチャより、pingはvIOS2を経由せずリプライが返されている。(リクエストはvIOS2からも受け取っている)
show ip pim interface
vIOS3#sh ip pim int
Address Interface Ver/ Nbr Query DR DR
Mode Count Intvl Prior
172.16.1.254 GigabitEthernet0/0 v2/S 0 30 1 172.16.1.254
192.168.3.3 GigabitEthernet0/1 v2/S 1 30 1 192.168.3.3
192.168.4.3 GigabitEthernet0/2 v2/S 1 30 1 192.168.4.3
vIOS2#sh ip pim int
Address Interface Ver/ Nbr Query DR DR
Mode Count Intvl Prior
192.168.2.2 GigabitEthernet0/1 v2/S 1 30 1 192.168.2.2
192.168.4.2 GigabitEthernet0/2 v2/S 1 30 1 192.168.4.3
vIOS1#sh ip pim int
Address Interface Ver/ Nbr Query DR DR
Mode Count Intvl Prior
10.1.1.254 GigabitEthernet0/0 v2/S 0 30 1 10.1.1.254
192.168.2.1 GigabitEthernet0/2 v2/S 1 30 1 192.168.2.2
192.168.3.1 GigabitEthernet0/3 v2/S 1 30 1 192.168.3.3
・vIOS3がDRに選出されている
疑問
Specifying the infinity keyword causes the router never to move to the shortest-path tree
Chapter: Optimizing PIM Sparse Mode in a Large IP Multicast Deployment
・ip pim stp-threshold infinityを設定することで、Shortest-path treeを利用しなくなり、共有ツリーを利用する(=RPを経由するようになる)
・はずなのに、infinityを設定するとRPからのICMPが来なくなる。挙動が逆では?
debug ip pimでチェック
#デバッグオン
vIOS3(config)#do debug ip pim
PIM debugging is on
vIOS3(config)#
##vIOS4からPingを飛ばす
*May 27 06:02:11.489: PIM(0): Insert (10.1.1.1,239.1.1.5) join in nbr 192.168.3.1's queue
*May 27 06:02:11.492: PIM(0): Building Join/Prune packet for nbr 192.168.3.1
*May 27 06:02:11.493: PIM(0): Adding v2 (10.1.1.1/32, 239.1.1.5), S-bit Join
*May 27 06:02:11.494: PIM(0): Send v2 join/prune to 192.168.3.1 (GigabitEthernet0/1)
vIOS3(config)#
#なんか突然出てきた
May 27 06:02:38.479: PIM(0): Building Periodic (,G) Join / (S,G,RP-bit) Prune message for 239.1.1.5
May 27 06:02:38.480: PIM(0): Insert (,239.1.1.5) join in nbr 192.168.4.2's queue
*May 27 06:02:38.483: PIM(0): Building Join/Prune packet for nbr 192.168.4.2
*May 27 06:02:38.483: PIM(0): Adding v2 (2.2.2.2/32, 239.1.1.5), WC-bit, RPT-bit, S-bit Join
*May 27 06:02:38.484: PIM(0): Send v2 join/prune to 192.168.4.2 (GigabitEthernet0/2)
#スイッチオーバーを無効にしてSPTを使用しないようにする
vIOS3(config)#ip pim spt-threshold infinity
#ping、再び
*May 27 06:03:10.380: PIM(0): Insert (10.1.1.1,239.1.1.5) join in nbr 192.168.3.1's queue
*May 27 06:03:10.381: PIM(0): Building Join/Prune packet for nbr 192.168.3.1
*May 27 06:03:10.382: PIM(0): Adding v2 (10.1.1.1/32, 239.1.1.5), S-bit Join
*May 27 06:03:10.382: PIM(0): Send v2 join/prune to 192.168.3.1 (GigabitEthernet0/1)
*May 27 06:03:10.649: PIM(0): Insert (10.1.1.1,239.1.1.5) sgr prune in nbr 192.168.4.2's queue
*May 27 06:03:10.656: PIM(0): Building Join/Prune packet for nbr 192.168.4.2
*May 27 06:03:10.656: PIM(0): Adding v2 (10.1.1.1/32, 239.1.1.5), RPT-bit, S-bit Prune
*May 27 06:03:10.657: PIM(0): Send v2 join/prune to 192.168.4.2 (GigabitEthernet0/2)
#なんか突然、再び
May 27 06:03:38.380: PIM(0): Building Periodic (,G) Join / (S,G,RP-bit) Prune message for 239.1.1.5
May 27 06:03:38.381: PIM(0): Insert (,239.1.1.5) join in nbr 192.168.4.2's queue
*May 27 06:03:38.382: PIM(0): Insert (10.1.1.1,239.1.1.5) sgr prune in nbr 192.168.4.2's queue
*May 27 06:03:38.383: PIM(0): Building Join/Prune packet for nbr 192.168.4.2
*May 27 06:03:38.384: PIM(0): Adding v2 (2.2.2.2/32, 239.1.1.5), WC-bit, RPT-bit, S-bit Join
*May 27 06:03:38.384: PIM(0): Adding v2 (10.1.1.1/32, 239.1.1.5), RPT-bit, S-bit Prune
*May 27 06:03:38.385: PIM(0): Send v2 join/prune to 192.168.4.2 (GigabitEthernet0/2)
#スイッチオーバーを有効にしなおす
vIOS3(config)#ip pim spt-threshold 0
#なんか突然、三度目
*May 27 06:04:09.381: PIM(0): Insert (10.1.1.1,239.1.1.5) join in nbr 192.168.3.1's queue
*May 27 06:04:09.383: PIM(0): Building Join/Prune packet for nbr 192.168.3.1
*May 27 06:04:09.383: PIM(0): Adding v2 (10.1.1.1/32, 239.1.1.5), S-bit Join
*May 27 06:04:09.384: PIM(0): Send v2 join/prune to 192.168.3.1 (GigabitEthernet0/1)
#デバッグ終了
vIOS3(config)#do no debug ip pim
PIM debugging is off
・スイッチオーバーを無効にしてからpingを飛ばすと、pingのタイミングでvIOS2からもPIMパケットを受信するようになり、有効にすると受信しなくなっているので正しい動きだと思う。
・たぶん、パケットキャプチャで見ているものが間違っている気がする。
参考
Multicast PIM-SM – Static RP Config 1
Chapter: Optimizing PIM Sparse Mode in a Large IP Multicast Deployment