DynagenでCCIEを目指す
20100327 PIM sparse-mode スイッチオーバーの確認
最終更新:
it_certification
-
view
目的
- マルチキャストにおける、スイッチオーバーの様子を確認します。
構成
- 設定概要
- Dynagen上のルータR4とWindows上のloopback adapterを接続します。
- loopback adapterの設定方法は「トップページ/手順書 ネットワーク系/Loopbackインターフェースとの接続」を確認してください。
- VLC media playerを用いて、loopback adapterをマルチキャストグループに参加させます。
- OSPFでルーティングします。
- 全ルータでマルチキャストを有効にします。
- 全I/Fをspase-modeにします。
- R3 loopback0をRPにします。
- 全ルータでRPをstaicに設定します。
- ラストホップルータR4でスイッチオーバーを無効にします。
- 構成図

- netファイル
ghostios = True sparsemem = True model = 2621 [localhost] [[2621]] image = C:\Program Files\Dynamips\images\c2600-ipbasek9-mz.124-21.bin ram = 256 [[ROUTER R1]] slot 1 = NM-1FE-TX f1/0 = R2 f1/0 [[ROUTER R2]] slot 1 = NM-1FE-TX f0/0 = R3 f0/0 f0/1 = R4 f0/1 [[ROUTER R3]] f1/0 = R4 f0/0 [[ROUTER R4]] slot 1 = NM-1FE-TX f1/0 = NIO_gen_eth:\Device\NPF_{EEC4A317-FFD6-4B4A-9787-64BB3651D3B0}
- R1
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! no ip domain lookup ip multicast-routing ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ip pim sparse-mode ! interface FastEthernet0/0 no ip address shutdown duplex auto speed auto ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.1.1 255.255.255.0 ip pim sparse-mode duplex auto speed auto ! router ospf 1 log-adjacency-changes network 1.1.1.1 0.0.0.0 area 0 network 192.168.1.0 0.0.0.255 area 0 ! ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.1.2 ! ip http server no ip http secure-server ip pim rp-address 3.3.3.3 1 ! access-list 1 permit 239.1.1.1 ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- R2
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! no ip domain lookup ip multicast-routing ! ! ! ! ! ! ! interface FastEthernet0/0 ip address 192.168.2.2 255.255.255.0 ip pim sparse-mode duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.4.2 255.255.255.0 ip pim sparse-mode duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.1.2 255.255.255.0 ip pim sparse-mode duplex auto speed auto ! router ospf 1 log-adjacency-changes network 192.168.1.0 0.0.0.255 area 0 network 192.168.2.0 0.0.0.255 area 0 network 192.168.4.0 0.0.0.255 area 0 ! ip forward-protocol nd ! ip http server no ip http secure-server ip pim rp-address 3.3.3.3 1 ! access-list 1 permit 239.1.1.1 ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- R3
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! no ip domain lookup ip multicast-routing ! ! ! ! ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.2.3 255.255.255.0 ip pim sparse-mode duplex auto speed auto ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.3.3 255.255.255.0 ip pim sparse-mode duplex auto speed auto ! router ospf 1 log-adjacency-changes network 3.3.3.3 0.0.0.0 area 0 network 192.168.2.0 0.0.0.255 area 0 network 192.168.3.0 0.0.0.255 area 0 ! ip forward-protocol nd ! ip http server no ip http secure-server ip pim rp-address 3.3.3.3 1 ! access-list 1 permit 239.1.1.1 ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- R4
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R4 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! no ip domain lookup ip multicast-routing ! ! ! ! ! ! ! interface FastEthernet0/0 ip address 192.168.3.4 255.255.255.0 ip pim sparse-mode duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.4.4 255.255.255.0 ip pim sparse-mode duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.0.4 255.255.255.0 ip pim sparse-mode ip igmp static-group 239.1.1.1 duplex auto speed auto ! router ospf 1 log-adjacency-changes network 192.168.0.0 0.0.0.255 area 0 network 192.168.3.0 0.0.0.255 area 0 network 192.168.4.0 0.0.0.255 area 0 ! ip forward-protocol nd ! ip http server no ip http secure-server ip pim rp-address 3.3.3.3 1 ip pim spt-threshold infinity ! access-list 1 permit 239.1.1.1 ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
検証1 スイッチオーバー無効の場合
- マルチキャストグループへの参加
ローカルPC上で、VLC media playerを起動し、239.1.1.1のマルチキャストグループに参加します。
その後、R4のマルチキャストルーティングテーブルを見て、確かに239.1.1.1のマルチキャストグループに参加できているかを確認する。
その後、R4のマルチキャストルーティングテーブルを見て、確かに239.1.1.1のマルチキャストグループに参加できているかを確認する。
R4#show ip mroute IP Multicast Routing Table Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected, L - Local, P - Pruned, R - RP-bit set, F - Register flag, T - SPT-bit set, J - Join SPT, M - MSDP created entry, X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement, U - URD, I - Received Source Specific Host Report, Z - Multicast Tunnel, z - MDT-data group sender, Y - Joined MDT-data group, y - Sending to MDT-data group Outgoing interface flags: H - Hardware switched, A - Assert winner Timers: Uptime/Expires Interface state: Interface, Next-Hop or VCD, State/Mode (*, 239.1.1.1), 00:24:52/00:02:19, RP 3.3.3.3, flags: SCF Incoming interface: FastEthernet0/0, RPF nbr 192.168.3.3 Outgoing interface list: FastEthernet1/0, Forward/Sparse, 00:24:52/00:02:19 <- ローカルPCへのI/Fがforwardになっている事を確認 (*, 239.255.255.250), 00:24:51/00:02:19, RP 0.0.0.0, flags: SC Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: FastEthernet1/0, Forward/Sparse, 00:24:51/00:02:19 (*, 224.0.1.40), 00:24:51/00:02:31, RP 0.0.0.0, flags: DCL Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: FastEthernet0/0, Forward/Sparse, 00:24:51/00:02:31
- ping送信
R1の1.1.1.1から239.1.1.1にpingを送信する
R1#ping 239.1.1.1 source 1.1.1.1
- ツリーの確認
R2のマルチキャストルーティングテーブルを確認します。
R2#show ip mroute IP Multicast Routing Table Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected, L - Local, P - Pruned, R - RP-bit set, F - Register flag, T - SPT-bit set, J - Join SPT, M - MSDP created entry, X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement, U - URD, I - Received Source Specific Host Report, Z - Multicast Tunnel, z - MDT-data group sender, Y - Joined MDT-data group, y - Sending to MDT-data group Outgoing interface flags: H - Hardware switched, A - Assert winner Timers: Uptime/Expires Interface state: Interface, Next-Hop or VCD, State/Mode (*, 239.1.1.1), 00:00:20/stopped, RP 3.3.3.3, flags: SP Incoming interface: FastEthernet0/0, RPF nbr 192.168.2.3 Outgoing interface list: Null (1.1.1.1, 239.1.1.1), 00:00:20/00:03:09, flags: Incoming interface: FastEthernet1/0, RPF nbr 192.168.1.1 Outgoing interface list: FastEthernet0/0, Forward/Sparse, 00:00:20/00:03:09 <- R3(RP)への送信元ツリー (*, 224.0.1.40), 00:25:00/00:02:49, RP 0.0.0.0, flags: DCL Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: FastEthernet1/0, Forward/Sparse, 00:24:38/00:02:17
検証2 スイッチオーバー有効の場合
- スイッチオーバー有効
R4でスイッチオーバー無効の設定を解除します。
R4(config)#no ip pim spt-threshold infinity
- パケットキャプチャの設定
R4 0/1でパケットキャプチャを行います。
=> capture R4 f0/1 cap_R4_01.cap
- ping送信
R1の1.1.1.1から239.1.1.1にpingを送信する
R1#ping 239.1.1.1 source 1.1.1.1
- マルチキャストルーティングテーブルの確認
R2およびR4でスイッチオーバーが起きた事を確認します。
R2#show ip mroute - 略 - (*, 239.1.1.1), 00:01:39/stopped, RP 3.3.3.3, flags: SP Incoming interface: FastEthernet0/0, RPF nbr 192.168.2.3 Outgoing interface list: Null (1.1.1.1, 239.1.1.1), 00:01:38/00:01:51, flags: T Incoming interface: FastEthernet1/0, RPF nbr 192.168.1.1 Outgoing interface list: FastEthernet0/1, Forward/Sparse, 00:00:02/00:03:27 <- RPを経由しない FastEthernet0/0, Forward/Sparse, 00:01:38/00:02:50 <- RP経由
しばらく待つと、R2のマルチキャストルーティングテーブルからRP経由のルートが消えています。
R2#show ip mroute - 略 - (1.1.1.1, 239.1.1.1), 00:02:16/00:03:27, flags: T Incoming interface: FastEthernet1/0, RPF nbr 192.168.1.1 Outgoing interface list: FastEthernet0/1, Forward/Sparse, 00:00:40/00:02:49 <- RP経由のルートがない
R4ではR2経由のツリーを確認できる
R4#show ip mroute (1.1.1.1, 239.1.1.1), 00:01:16/00:02:20, flags: JT Incoming interface: FastEthernet0/1, RPF nbr 192.168.4.2 <- R2経由である事が分かる Outgoing interface list: FastEthernet1/0, Forward/Sparse, 00:01:16/00:02:47
- パケットキャプチャの確認
R4からR2に対して、Joinメッセージが送信された事が確認できます。
