一、下载eNSP和vlc播放器eNSP正式版本下载地址:!download.action?contentId=SW1000002740&contentType=SOFT&partNo=2001VLC是开源软件下载地址是:二、安装vlc播放器下载后自行安装即可,注意要记下安装目录,等下要用。如果下载的是ZIP压缩包,解压到任意目录即可。三、配置eNSP的vlc参数菜单-工具-选项-工具配置VLC后面指定你刚才安装的目录\vlc.exe四、如图搭建拓扑(也可自己定义,第一次推荐照着来)五、配置网络里的各设备1路由器的配置(可以贴进去):sysnamear1220multicastrouting-enable#全局开启组播功能的命令interfaceEthernet0/0/0undoshutdownipaddress192.168.200.1255.255.255.0pimsm#接组播服务器的接口下配置pim为稀疏模式interfaceEthernet0/0/1undoshutdownipaddress192.168.100.1255.255.255.0pimsm#接三层交换机的接口下配置pim为稀疏模式ospf1#配置OSPF保证路由器和交换机之间的单播路由互通area0.0.0.0network192.168.100.00.0.0.255network192.168.200.00.0.0.255pim#路由器上配置pim的c-bsr(候选自举路由器)和c-rp(候选汇聚点)c-bsrpriority10c-bsrEthernet0/0/0#pim稀疏模式配置c-bsr,用来集中通告rp(组播相关概念的详细说明请查HedEx)c-rppriority10c-rpEthernet0/0/0#pim稀疏模式配置c-rp,用来选举rp2交换机的配置(可以贴进去)sysnamesw5700vlanbatch1020100#创建vlanmulticastrouting-enable#全局开启组播功能的命令interfaceVlanif10ipaddress192.168.10.1255.255.255.0pimsm#vlanif10接口下开启pim稀疏模式igmpenable#接组播客户端的接口开启igmp功能,默认是V2interfaceVlanif20ipaddress192.168.20.1255.255.255.0pimsm#vlanif20接口下开启pim稀疏模式igmpenable#接组播客户端的接口开启igmp功能,默认是V2interfaceVlanif100ipaddress192.168.100.100255.255.255.0pimsm#vlanif100接口下开启pim稀疏模式,此接口是接路由器的,可以不开igmp功能interfaceGigabitEthernet0/0/1porthybridpvidvlan100porthybriduntaggedvlan100interfaceGigabitEthernet0/0/2porthybridpvidvlan10porthybriduntaggedvlan10interfaceGigabitEthernet0/0/3porthybridpvidvlan20porthybriduntaggedvlan20ospf1#配置OSPF保证路由器和交换机之间的单播路由互通area0.0.0.0network192.168.10.00.0.0.255network192.168.20.00.0.0.255network192.168.100.00.0.0.2553配置MCS服务器配置好了就点“运行”,此时可以看以服务器的视频播放。4配置PC1(PC2类似)配置好了点“加入”“启动VLC”这个时候应该可以看到PC上播放的视频了,和服务器是一样的(会有一点滞后)七、验证参数[ar1220]displaypiminterface#可以看到本路由器上参与pim的接口VPN-Instance:publicnetInterfaceStateNbrCntHelloIntDR-PriDR-AddressEth0/0/0up0301192.168.200.1(local)Eth0/0/1up1301192.168.100.100#pim上在以太网上要选DR,(local)表示是自己为DR[ar1220]displaypimneighbor#路由器上看到的邻居是交换机192.168.100.100VPN-Instance:publicnetTotalNumberofNeighbors=1NeighborInterfaceUptimeExpiresDr-Priority192.168.100.100Eth0/0/100:19:4300:01:231[ar1220]dispimrouting-table#查看pim组播路由表的命令,也可以用dismulticastrouting-tableVPN-Instance:publicnetTotal1(*,G)entry;1(S,G)entry(*,225.1.1.1)RP:192.168.200.1(local)Protocol:pim-sm,Flag:WCUpTime:00:01:23Upstreaminterface:RegisterUpstreamneighbor:NULLRPFprimeneighbor:NULLDownstreaminterface(s)information:Totalnumberofdownstreams:11:Ethernet0/0/1Protocol:pim-sm,UpTime:00:01:23,Expires:00:03:06(192.168.200.200,225.1.1.1)RP:192.168.200.1(local)Protocol:pim-sm,Flag:SPT2MSDPLOCACTUpTime:00:03:39Upstreaminterface:Ethernet0/0/0Upstreamneighbor:NULLRPFprimeneighbor:NULLDownstreaminterface(s)information:Totalnumberofdownstreams:11:Ethernet0/0/1Protocol:pim-sm,UpTime:00:01:23,Expires:00:03:06[sw5700]dispimrp-info#查看rp的信息,交换机上可以看到rp是路由器192.168.200.1VPN-Instance:publicnetPIM-SMBSRRPNumber:1Group/MaskLen:224.0.0.0/4RP:192.168.200.1#这里可以看到rp的地址是192.168.200.1,优先级是10,候选RP的优先级越高越容易成为RP。Priority:10Uptime:00:18:37Expires:00:01:36[sw5700]dismulticastrouting-table#交换机上的组播路由表MulticastroutingtableTotal1entry00001.(192.168.200.200,225.1.1.1)Uptime:00:01:53UpstreamInterface:Vlanif100#组播来源的接口是vlan100Listof2downstreaminterfaces#组播流去向:vlan10vlan201:Vlanif102:Vlanif20[sw5700]displayigmpinterface#查看参与IGMP的接口InterfaceinformationVlanif10(192.168.10.1):IGMPisenabled#IGMPCurrentIGMPversionis2#IGMP版本是2IGMPstate:upIGMPgrouppolicy:noneIGMPlimit:-ValueofqueryintervalforIGMP(negotiated):-ValueofqueryintervalforIGMP(configured):60sValueofotherqueriertimeoutforIGMP:0sValueofmaximumqueryresponsetimeforIGMP:10sQuerierforIGMP:192.168.10.1(thisrouter)#查询路由器是本路由器Total1IGMPGroupreportedVlanif20(192.168.20.1):IGMPisenabledCurrentIGMPversionis2IGMPstate:upIGMPgrouppolicy:noneIGMPlimit:-ValueofqueryintervalforIGMP(negotiated):-ValueofqueryintervalforIGMP(configured):60sValueofotherqueriertimeoutforIGMP:0sValueofmaximumqueryresponsetimeforIGMP:10sQuerierforIGMP:192.168.20.1(thisrouter)