从BCMSN第四版上看到的,感觉很清晰,结果没找到电子档的,于是敲出来自己收集,顺便发出来
步骤1 在全局模式下启用第三层多播路由选择功能:
Switch(config)# ip multicast-routing
步骤2 在需要支持多播的接口上启动PIM:
Switch(config)# ip pim [dense-mode | sparse-mode | sparse-dense-mode]
步骤3 (可选)如果运行的是PIM稀疏模式-密集模式,则配置PR。可对Cisco IOS软件进行配置,使之对同一个多播组的通信流使用一个或多个RP。必须在所有路由器(包括RP路由器)上配置RP的地址。如果希望配置RP的地址,那么就需要在全局模式下使用以下命令:
Switch(config)# ip pim rp-address ip-address [access-list-number] [override]
步骤4 (可选)如果希望使用访问控制列表将路由器指定为所有多播组或特定多播组的候选RP,那么就需要在全局模式下使用以下命令:
Switch(config)# ip pim send-rp-announce interface-type interface-number scope ttl [group-list access-list-number] [interval seconds]
步骤5 (可选)如果希望在步骤4所配置的路由器指派自动-RP的RP映射代理角色,那么就需要在全局模式下使用以下命令:
Switch(config)# ip pim send-rp-discovery scope ttl
步骤6 (可选)所有运行Cisco IOS 11.3(2)T或更高版本的系统都默认使用PIM第2版。如果由于某种原因需要更改版本号,可使用如下命令:
Switch(config)# ip pim version [ 1 | 2 ]
步骤7 (可选)配置PIM域的BSR边界路由器,以防自举消息沿任何方向跨越该边界。这样,在PIM边界的两边,将选举不同的BSR。在接口上配置如下命令,这样该接口将不会接受和发送PIM第2版BSR消息:
Switch(config)# ip pim bsr-border
步骤8 (可选)如果希望将接口配置为候选BSR,那么就需要使用下列命令:
Switch(config)# ip pim bsr-candidate interface-type hash-mask-length [priority]
其中,hash-mask-length 是调用哈希函数之前用于组地址的32为编码。所有哈希种子值(Seed hash)相同的多播组都对应于相同的RP。
priority 的取值范围是0~255.优先级最高的候选BSR将赢得选举。如果优先级相同,IP地址最大的设备将被选作BSR。默认值为0。
步骤9 (可选)如果希望将接口配置为特定多组的的候选RP,那么就需要使用下列命令:
Switch(config)# ip pim rp-candidate interface-type interface-number ttl group-list access-list
例1 Cisco IOS中的PIM稀疏模式配置
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip multicast-routing
Switch(config)#int vlan 1
Switch(config-if)#ip pim sparse-mode
Switch(config-if)#int vlan 3
Switch(config-if)#ip pim sparse-mode
Switch(config-if)#exit
Switch(config)#ip pim rp-address 1.1.1.1
Switch(config)#
例2 支持BSR的稀疏-密集模式多播配置
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip multicast-routing
Switch(config)#int vlan 1
Switch(config-if)#ip pim sparse-dense-mode
Switch(config-if)#exit
Switch(config)#ip pim bsr-candidate vlan 1 30 200
Switch(config)#
例3 支持自动-RP的稀疏密集模式IP多播配置
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip multicast-routing
Switch(config)#int vlan 1
Switch(config-if)#ip pim sparse-dense-mode
Switch(config-if)#exit
Switch(config)#ip pim send-rp-announce vlan 1 scope 15 group-list 1
Switch(config)#access-list 1 permit 1.1.1.0 0.0.0.255
Switch(config)#exit
补充:
ip igmp join 224.1.1.1
Name : Jakee.
Leave a comment