-
配置接口IP地址 [LSW1]vlan batch 10 100 [LSW1-GigabitEthernet0/0/3]port link-type trunk [LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 [LSW1-GigabitEthernet0/0/1]port link-type hybrid [LSW1-GigabitEthernet0/0/1]port hybrid untagged vlan 100 [LSW1-GigabitEthernet0/0/1]port hybrid pvid vlan 100 [LSW1-GigabitEthernet0/0/1]q [LSW1-Vlanif10]ip add 10.1.1.1 24 [LSW1-Vlanif100]ip add 192.168.1.1 2 [LSW2]vlan batch 20 200 [LSW2-GigabitEthernet0/0/4]port link-type trunk [LSW2-GigabitEthernet0/0/4]port trunk allow-pass vlan 20 [LSW2-GigabitEthernet0/0/1]port link-type hybrid [LSW2-GigabitEthernet0/0/1]port hybrid untagged vlan 200 [LSW2-GigabitEthernet0/0/1]port hybrid pvid vlan 200 [LSW2-Vlanif20]ip add 10.1.2.2 24 [LSW2-Vlanif200]ip add 192.168.2.2 24 [LSW3]vlan batch 10 30 300 [LSW3-GigabitEthernet0/0/1]port link-type trunk [LSW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 [LSW3-GigabitEthernet0/0/5]port link-type trunk [LSW3-GigabitEthernet0/0/5]port trunk allow-pass vlan 30 [LSW3-GigabitEthernet0/0/2]port link-type hybrid [LSW3-GigabitEthernet0/0/2]port hybrid untagged vlan 300 [LSW3-GigabitEthernet0/0/2]port hybrid pvid vlan 300 [LSW3-Vlanif10]ip add 10.1.1.3 24 [LSW3-Vlanif30]ip add 10.1.3.3 24 [LSW3-Vlanif300]ip add 192.168.3.3 24 [LSW3-LoopBack0]ip add 10.5.5.5 32 [LSW3-LoopBack1]ip add 10.3.3.3 32 [LSW3-LoopBack10]ip add 1.1.1.1 32 [LSW4]vlan batch 20 40 400 [LSW4-GigabitEthernet0/0/2]port link-type trunk [LSW4-GigabitEthernet0/0/2]port trunk allow-pass vlan 20 [LSW4-GigabitEthernet0/0/5]port link-type trunk [LSW4-GigabitEthernet0/0/5]port trunk allow-pass vlan 40 [LSW4-GigabitEthernet0/0/1]port link-type hybrid [LSW4-GigabitEthernet0/0/1]port hybrid untagged vlan 400 [LSW4-GigabitEthernet0/0/1]port hybrid pvid vlan 400 [LSW4-Vlanif20]ip add 10.1.2.4 24 [LSW4-Vlanif40]ip add 10.1.4.4 24 [LSW4-Vlanif400]ip add 192.168.4.4 24 [LSW4-LoopBack0]ip add 10.2.2.2 32 [LSW4-LoopBack1]ip add 10.4.4.4 32 [LSW4-LoopBack10]ip add 1.1.1.1 32 [LSW5]vlan batch 30 40 [LSW5-GigabitEthernet0/0/3]port link-type trunk [LSW5-GigabitEthernet0/0/3]port trunk allow-pass vlan 30 [LSW5-GigabitEthernet0/0/4]port link-type trunk [LSW5-GigabitEthernet0/0/4]port trunk allow-pass vlan 40 [LSW5-Vlanif30]ip add 10.1.3.5 24 [LSW5-Vlanif40]ip add 10.1.4.5 24 -
配置单播路由协议-OSPF [LSW1]ospf 1 [LSW1-ospf-1]area 0 [LSW1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255 [LSW1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255 [LSW2]ospf 1 [LSW2-ospf-1]area 0 [LSW2-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255 [LSW2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255 [LSW3]ospf 1 [LSW3-ospf-1]area 0 [LSW3-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255 [LSW3-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255 [LSW3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255 [LSW3-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0 [LSW3-ospf-1-area-0.0.0.0]network 10.3.3.3 0.0.0.0 [LSW3-ospf-1-area-0.0.0.0]network 10.5.5.5 0.0.0.0 [LSW4]ospf 1 [LSW4-ospf-1]area 0 [LSW4-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255 [LSW4-ospf-1-area-0.0.0.0]network 10.1.4.0 0.0.0.255 [LSW4-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255 [LSW4-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0 [LSW4-ospf-1-area-0.0.0.0]network 10.2.2.2 0.0.0.0 [LSW4-ospf-1-area-0.0.0.0]network 10.4.4.4 0.0.0.0 [LSW5]ospf 1 [LSW5-ospf-1]area 0 [LSW5-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255 [LSW5-ospf-1-area-0.0.0.0]network 10.1.4.0 0.0.0.255 -
使能组播路由功能,并配置PIM-SM功能 [LSW1]multicast routing-enable [LSW1-Vlanif10]pim sm [LSW1-Vlanif100]pim sm [LSW2]multicast routing-enable [LSW2-Vlanif20]pim sm [LSW2-Vlanif200]pim sm [LSW3]multicast routing-enable [LSW3-Vlanif10]pim sm [LSW3-Vlanif30]pim sm [LSW3-Vlanif300]pim sm [LSW4]multicast routing-enable [LSW4-Vlanif20]pim sm [LSW4-Vlanif40]pim sm [LSW4-Vlanif400]pim sm [LSW5]multicast routing-enable [LSW5-Vlanif30]pim sm [LSW5-Vlanif40]pim sm -
在主机侧接口使能IGMP功能 [LSW3-Vlanif300]igmp enable [LSW4-Vlanif400]igmp enable -
配置C-BSR、C-RP的位置 [LSW3-LoopBack1]pim sm [LSW3-LoopBack10]pim sm [LSW3]pim [LSW3-pim]c-bsr LoopBack 1 [LSW3-pim]c-rp LoopBack 10 [LSW4-LoopBack1]pim sm [LSW4-LoopBack10]pim sm [LSW4]pim [LSW4-pim]c-bsr LoopBack 1 [LSW4-pim]c-rp LoopBack 10 -
配置MSDP对等体 [LSW3-LoopBack0]pim sm [LSW3]msdp [LSW3-msdp]originating-rp LoopBack 0 [LSW3-msdp]peer 10.2.2.2 connect-interface LoopBack 0 [LSW4-LoopBack0]pim sm [LSW4]msdp [LSW4-msdp]originating-rp LoopBack 0 [LSW4-msdp]peer 10.5.5.5 connect-interface LoopBack 0 -
验证配置
PIM-SM域内组播源MCS1向组播组G(225.1.1.1)发送组播信息,用户PC1加入组播组G,接收发往组G的组播数据,通过比较LSW3和LSW4上PIM路由的显示信息,可知当前有效RP是LSW3:MCS1向LSW3注册,PC1向LSW3发起加入
PC1退出组播组G,MCS1停止向组播组G发送组播数据,使用命令LSW3上的组播路由表项和转发表项 reset multicast routing-table all reset multicast forwarding-table all 用户PC2加入组播组G,MCS2开始向组播组G发送组播数据,通过比较LSW3和LSW4上PIM路由的显示信息,可知当前有效RP是LSW4:MCS2向LSW4注册,PC2向LSW4发起加入
|