Cisco IOS マルチキャスト IGMP Stub Routerの設定方法

スポンサーリンク

フレームリレーのような低帯域環境でPIMメッセージを頻繁にやりとりするのは帯域の無駄です。このような場合は、IGMP messageを転送するIGMP Stub Routerという構成を採用する事で帯域の節約が図れます

コマンド一覧

このシナリオで重要なコマンド一覧は以下の通りです。

Router(config-if)# ip igmp helper-address <addr>
Router(config-if)# ip pim dense-mode
Router(config-if)# ip pim neighbor-filter <acl>

構成図

これ以降の動作確認は、以下の環境で行います。R1, R2, R3, R4はHub and Spokeのframe relay構成で、R4をHub Routerとします。

 [ip address]
                                 s0/0
                         +--------+.2
                         |   R2   +----┐
                         +--------+    │
                                       │
                                       │.2
 +--------+        +--------+      +---+----+      +--------+
 | Host 1 +--------+   R1   +------+  FRSW  +------+   R4  | 
 +--------+.101  .1+--------+.1    +---+----+.4  .4+--------+
         e1/0    e1/0      s0/0        │.3      s0/0
        192.168.1.0/24                 │192.168.0.0/24
                         +--------+    │
                         |   R3   +----┘
                         +--------+.3
                                 s0/0
                  R1 Loopback0                     R4 Loopback0
                  10.1.1.1/32                      10.2.2.2/32

 [frame relay mapping]
 1:104 = 4:401
 2:204 = 4:402
 3:304 = 4:403
 [R1]
interface Serial0/0
 ip pim sparse-mode
!
ip pim autorp listener

 [R2]
interface Serial0/0
 ip pim sparse-mode
!
ip pim autorp listener

 [R3]
interface Serial0/0
 ip pim sparse-mode
!
ip pim autorp listener

 [R4]
interface Serial0/0
 ip pim sparse-mode
!
ip pim autorp listener
ip pim send-rp-announce Loopback0 scope 1
ip pim send-rp-discovery Loopback0 scope 2 interval 15

 [Host1]
ip route 0.0.0.0 0.0.0.0 192.168.1.1

設定全文は下記ファイルです。詳細設定は下記を参照ください。

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 5
!
!
ip cef
no ip domain lookup
!
!
ip multicast-routing 
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.1.1.1 255.255.255.255
 ip pim sparse-mode
!
interface Serial0/0
 ip address 192.168.0.1 255.255.255.0
 ip pim sparse-mode
 encapsulation frame-relay
 ip ospf priority 0
 serial restart-delay 0
 frame-relay map ip 192.168.0.4 104 broadcast
!
interface Serial0/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface Ethernet1/0
 ip address 192.168.1.1 255.255.255.0
 ip pim sparse-mode
 half-duplex
!
interface Ethernet1/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet1/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet1/3
 no ip address
 shutdown
 half-duplex
!
!
router ospf 1
 log-adjacency-changes
 network 10.1.1.1 0.0.0.0 area 0
 network 192.168.0.1 0.0.0.0 area 0
 network 192.168.1.1 0.0.0.0 area 0
!
ip http server
ip forward-protocol nd
!
!
ip pim autorp listener
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
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 5
!
!
ip cef
no ip domain lookup
!
!
ip multicast-routing 
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial0/0
 ip address 192.168.0.2 255.255.255.0
 ip pim sparse-mode
 encapsulation frame-relay
 ip ospf priority 0
 serial restart-delay 0
 frame-relay map ip 192.168.0.4 204 broadcast
!
interface Serial0/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
!
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
ip pim autorp listener
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
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 5
!
!
ip cef
no ip domain lookup
!
!
ip multicast-routing 
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial0/0
 ip address 192.168.0.3 255.255.255.0
 ip pim sparse-mode
 encapsulation frame-relay
 ip ospf priority 0
 serial restart-delay 0
 frame-relay map ip 192.168.0.4 304 broadcast
!
interface Serial0/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
!
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
ip pim autorp listener
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
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 5
!
!
ip cef
no ip domain lookup
!
!
ip multicast-routing 
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.4.4.4 255.255.255.255
 ip pim sparse-mode
!
interface Serial0/0
 ip address 192.168.0.4 255.255.255.0
 ip pim nbma-mode
 ip pim sparse-mode
 encapsulation frame-relay
 serial restart-delay 0
 frame-relay map ip 192.168.0.1 401 broadcast
 frame-relay map ip 192.168.0.2 402 broadcast
 frame-relay map ip 192.168.0.3 403 broadcast
!
interface Serial0/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
!
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
 neighbor 192.168.0.1
 neighbor 192.168.0.2
 neighbor 192.168.0.3
!
ip http server
ip forward-protocol nd
!
!
ip pim autorp listener
ip pim send-rp-announce Loopback0 scope 1
ip pim send-rp-discovery Loopback0 scope 2 interval 15
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end
Host1
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Host1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet1/0
 ip address 192.168.1.101 255.255.255.0
 half-duplex
!
interface Ethernet1/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet1/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet1/3
 no ip address
 shutdown
 half-duplex
!
!
ip http server
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end

IGMP Stub Router

仕様説明

上記のようなHub and Spokeの構成の場合、通常のマルチキャストルーティングを行うと、PIM join, pruneのようなメッセージがHub Router(R4)のinterfaceをoverwhelmさせてしまう恐れがあります。このような事態を回避するテクニックがIGMP Stub Routerです。IGMP Stub Router(R1)はIGMP messageをHub Router(R4)に転送する事で帯域の節約を図ります。

IGMPを転送するためには、以下のコマンドを使用します。

Router(config-if)# ip igmp helper-address <addr>

IGMP Stub Router(R1)はupstream(R4)から受信したパケットをdownstream(Host1)に転送する必要があります。PIM dense modeにすれば確実にupstreamからdownstreamに転送しますので、たとえmulticast domain全体がsparse modeで動作していたとしてもIGMP Stub Routerはdense modeで動作させる事が推奨されています。

Router(config-if)# ip pim dense-mode

Hub Router(R4)がIGMP Stub Router(R1)とPIM neighborを確立しないよう設定します。Cisco IOSはPIM neighborが確立されている機器に対してマルチキャストパケットをfloodします。仮にR4がR1とneihgborが確立されている状態ですと、R1へ不要なマルチキャストパケットも転送されR1はPIM pruneを返さなければなりません。

なお、PIM neighborは片方向の概念ですので、IGMP Stub Router(R1)側にfilterの設定をしても意味がありません。

Router(config-if)# ip pim neighbor-filter <acl>

IGMP helper

Host1から受信したIGMPをHub Router(R4)に転送するように、以下設定をR1に投入します。

 [R1]
interface Ethernet1/0
 ip igmp helper-address 192.168.0.4

Host1からIGMP join messageを送り、メッセージがR4に転送されている事を確認します。

 [Host1]
interface Ethernet1/0
 ip igmp join-group 239.1.1.1

 [R4]
R4#show ip igmp groups
IGMP Connected Group Membership
Group Address    Interface                Uptime    Expires   Last Reporter   Group Accounted
239.1.1.1        Serial0/0                00:00:35  00:02:58  192.168.0.1
224.0.1.39       Serial0/0                00:18:54  00:02:52  192.168.0.4
224.0.1.39       Loopback0                00:18:54  00:02:15  10.4.4.4
224.0.1.40       Loopback0                00:18:54  00:02:09  10.4.4.4
224.0.1.40       Serial0/0                00:20:25  00:02:52  192.168.0.1
R4#

PIM dense mode

Host1から受信したIGMPをHub Router(R4)に転送するように、R1をdense modeに変更します。

 [R1]
interface Serial0/0
 ip pim dense-mode
!
interface Ethernet1/0
 ip pim dense-mode

PIM neighbor filter

Hub Router(R4)がIGMP Stub Router(R1)に不要なパケットを転送しないようPIM neighbor filterを定義します。

 [R4]
ip access-list standard PIM_FILTER
 10 deny 192.168.0.1
 20 permit any
!
interface Serial0/0
 ip pim neighbor-filter PIM_FILTER

IGMP Stub Router(R1)とneighborが確立されていない事と、他のPIM neighborに影響を与えていない事を確認します。

 [R4]
R4#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
      S - State Refresh Capable
Neighbor          Interface                Uptime/Expires    Ver   DR
Address                                                            Prio/Mode
192.168.0.2       Serial0/0                00:32:28/00:01:18 v2    1 / S
192.168.0.3       Serial0/0                00:32:52/00:01:26 v2    1 / S
R4#

IGMP Stub Router(R1)を介した通信が可能な事を確認します。

 [R4]
R4#ping 239.1.1.1 source Loopback 0

Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 10.4.4.4

Reply to request 0 from 192.168.1.101, 108 ms
Reply to request 0 from 192.168.1.101, 108 ms
R4#
タイトルとURLをコピーしました