常用组播路由协议配置方法
1IGMP协议配置
1.1 IGMP基本设置
1.1.1配置路由器加入到一个组播组:
Router(config-if)# ip igmp join-group 225.2.2.2
1.1.2控制某个接口下主机能够加入的组播组
ip igmp access-group access-list
【例如】
Router(config)# access-list 1 225.2.2.2 0.0.0.0
Router(config)# interface ethernet 0
Router(config-if)ip igmp access-group 1
ACL可以同时对组播报文的源和目的地址控制,达到过滤组播源,同时也能过滤特定
接收主机的作用,例如:
Deny all state for a group G
deny igmp any host G
permit igmp any any
Deny all state for a source S
deny igmp host S any
permit igmp any any
Permit all state for a group G
permit igmp any host G
Permit all state for a source S
permit igmp host S any
Filter a particular source for a group G
deny igmp host S host G
permit igmp any host G
1.1.3IGMP版本切换
Router(config-if)# ip igmp version {2|3}
1.1.4IGMP查询间隔时间:默认60s
Router(config-if)# ip igmp query-interval 120
1.1.5IGMP查询超时时间:默认为2倍的查询间隔时间
Router(config-if)# ip igmp query-timeout 30
1.1.6IGMP查询最大响应时间:默认为10s
Router(config-if)# ip igmp query-max-response-time 8
1.2 IGMP Proxy
如图2,当C收到组播请求后,发送一条PIM-SM join的消息给B,B发送一个IGMP 的请求到A,A通过一条单播链路将数据传送到B,这个过程就需要一个IGMP的代理,配置如下:
图2
【例如】
Router A Configuration
interface ethernet 0
ip address 10.1.1.1 255.255.255.0
ip pim dense-mode
!
interface ethernet 1
ip address 10.2.1.1 255.255.255.0
ip pim dense-mode
ip igmp unidirectional link
!
interface ethernet 2
ip address 10.3.1.1 255.255.255.0
Router B Configuration
ip pim rp-address 10.5.1.1 5
access-list 5 permit 239.0.0.0 0.255.255.255.255
!
interface loopback 0
ip address 10.7.1.1 255.255.255.0
ip pim dense-mode
ip igmp helper-address udl ethernet 0
ip igmp proxy-service
!
interface ethernet 0
ip address 10.2.1.2 255.255.255.0
ip pim dense-mode
ip igmp unidirectional link
!
interface ethernet 1
ip address 10.5.1.1 255.255.255.0
ip pim sparse-mode
ip igmp mroute-proxy loopback 0
!
interface ethernet 2
ip address 10.6.1.1 255.255.255.0
Router C Configuration
ip pim rp-address 10.5.1.1 5
access-list 5 permit 239.0.0.0 0.255.255.255
!
interface ethernet 0
ip address 10.8.1.1 255.255.255.0
ip pim sparse-mode
!
interface ethernet 1
ip address 10.9.1.1 255.255.255.0
ip pim sparse-mode
1.3 IGMP Snooping
1.3.1开启IGMP轮询
Router(config)#ip igmp snooping
1.3.2IGMP Snooping调整
在单个vlan中启用Snooping:
ip igmp snooping vlan
1.3.3IGMP Snooping快速离开
ip igmp snooping vlan immediate-leave
The following example shows how to enable IGMP Immediate-Leave processing on VLAN 1:
Router(config)# ip igmp snooping vlan 1 immediate-leave
1.3.4IGMP Snooping参考多播路由