组播综合实验
如下拓扑:
实验需求:
- 如图所示,要求在网络中部署PIM-SM协议且以静态方式指定R2为RP。
- 用户侧网络配置IGMPv2协议,同时需要尽可能地降低用户侧网络资源消耗,提高安全性。
- R5和R6连接接收者,要求在R5和RP之间建立RPT。
- R4连接重要的用户网络,当用户加入组播组238.1.1.1组后,需要马上就能收到组播数据
实验分析
- 在路由器上配置PIM-SM,静态配置R2为RP
- 用户侧配置IGMPv2,并配置IGMP Snooping
- 客户端DR负责向RP建立RPT,根据DR的选举规则,将R5接口的DR优先级设置大于1(DR默认优先级为1)
- 在R4的下游接口,配置静态加组。当PC1需要组播数据,发送成员关系报告,R4就会有组播转发表项,会立即转发组播报文
基础配置
- PC配置
# PC1
IP:192.168.1.1
NETMASK:255.255.255.0
GATEWAY:192.168.1.254
--------------------------
# PC2
IP:192.168.2.1
NETMASK:255.255.255.0
GATEWAY:192.168.2.254
--------------------------
# PC3
IP:192.168.2.2
NETMASK:255.255.255.0
GATEWAY:192.168.2.254
- 服务器配置
IP:172.16.1.1
NETMASK:255.255.255.0
GATEWAY:172.16.1.254
- 路由器配置
#
sysname AR1
#
interface GigabitEthernet0/0/0
ip address 172.16.1.254 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.1.12.1 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.1.13.1 255.255.255.0
#
sysname AR2
#
interface GigabitEthernet0/0/0
ip address 10.1.12.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.1.23.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.1.25.2 255.255.255.0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
R2的环回口方便静态配置R2为RP
#
sysname AR3
#
interface GigabitEthernet0/0/0
ip address 10.1.13.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.1.23.3 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.1.36.3 255.255.255.0
#
interface GigabitEthernet2/0/0
ip address 10.1.34.3 255.255.255.0
#
sysname AR4
#
interface GigabitEthernet0/0/0
ip address 10.1.34.4 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.1.254 255.255.255.0
#
sysname AR5
#
interface GigabitEthernet0/0/0
ip address 10.1.25.5 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.2.3 255.255.255.0
#
sysname AR6
#
interface GigabitEthernet0/0/0
ip address 10.1.36.6 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.2.4 255.255.255.0
配置VRRP
[AR5]int g0/0/1
[AR5-GigabitEthernet0/0/1]vrrp vrid 1 virtual-ip 192.168.2.254
[AR6]int g0/0/1
[AR6-GigabitEthernet0/0/1]vrrp vrid 1 virtual-ip 192.168.2.254
配置OSPF
- 实现全网互通
[AR1]ospf
[AR1-ospf-1]area 0
[AR1-ospf-1-area-0.0.0.0]net 172.16.1.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]net 10.1.13.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]net 10.1.12.0 0.0.0.255
[AR2]ospf
[AR2-ospf-1]area 0
[AR2-ospf-1-area-0.0.0.0]net 2.2.2.2 0.0.0.0
[AR2-ospf-1-area-0.0.0.0]net 10.1.12.0 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]net 10.1.23.0 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]net 10.1.25.0 0.0.0.255
[AR3]ospf
[AR3-ospf-1]area 0
[AR3-ospf-1-area-0.0.0.0]net 10.1.13.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]net 10.1.23.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]net 10.1.34.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]net 10.1.36.0 0.0.0.255
[AR4]ospf
[AR4-ospf-1]area 0
[AR4-ospf-1-area-0.0.0.0]net 192.168.1.0 0.0.0.255
[AR4-ospf-1-area-0.0.0.0]net 10.1.34.0 0.0.0.255
[AR5]ospf
[AR5-ospf-1]area 0
[AR5-ospf-1-area-0.0.0.0]net 192.168.2.0 0.0.0.255
[AR5-ospf-1-area-0.0.0.0]net 10.1.25.0 0.0.0.255
[AR6]ospf
[AR6-ospf-1]area 0
[AR6-ospf-1-area-0.0.0.0]net 192.168.2.0 0.0.0.255
[AR6-ospf-1-area-0.0.0.0]net 10.1.36.0 0.0.0.255
测试PC与组播服务器之间的连通性
配置PIM
[AR1]multicast routing-enable //开启组播功能
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]pim sm
[AR1-GigabitEthernet0/0/0]int g0/0/1
[AR1-GigabitEthernet0/0/1]pim sm
[AR1-GigabitEthernet0/0/1]int g0/0/2
[AR1-GigabitEthernet0/0/2]pim sm
[AR1-GigabitEthernet0/0/2]pim
[AR1-pim]static-rp 2.2.2.2 //静态配置R2为RP
# R2配置与R1相同
[AR3]multicast routing-enable
[AR3]interface g0/0/0
[AR3-GigabitEthernet0/0/0]pim sm
[AR3-GigabitEthernet0/0/0]interface g0/0/1
[AR3-GigabitEthernet0/0/1]pim sm
[AR3-GigabitEthernet0/0/1]interface g0/0/2
[AR3-GigabitEthernet0/0/2]pim sm
[AR3-GigabitEthernet0/0/2]interface g2/0/0
[AR3-GigabitEthernet2/0/0]pim sm
[AR3-GigabitEthernet2/0/0]pim
[AR3-pim]static-rp 2.2.2.2
[AR4]multicast routing-enable
[AR4]interface g0/0/0
[AR4-GigabitEthernet0/0/0]pim sm
[AR4-GigabitEthernet0/0/0]interface g0/0/1
[AR4-GigabitEthernet0/0/1]pim sm
[AR4-GigabitEthernet0/0/1]pim
[AR4-pim]static-rp 2.2.2.2
# R5、R6配置与R4相同
必须先配置PIM再配置IGMP!
配置IGMP
[AR4]int g0/0/1
[AR4-GigabitEthernet0/0/1]igmp enable
[AR5]int g0/0/1
[AR5-GigabitEthernet0/0/1]igmp enable
[AR6]int g0/0/1
[AR6-GigabitEthernet0/0/1]igmp enable
IGMP默认版本为IGMPv2
开启IGMP Snooping
[SW1]igmp-snooping enable
实验过程中这里配置后,PC端无法接收到组播流量
配置静态加组
[AR4]int g0/0/1
[AR4-GigabitEthernet0/0/1]igmp static-group 238.1.1.1
修改优先级
[AR5]int g0/0/1
[AR5-GigabitEthernet0/0/1]pim hello-option dr-priority 100 //修改DR的优先级
测试
- 服务器、PC配置组播组为238.1.1.1
- 配置完组播地址,一定要点目的MAC!
- 在PC端接受组播源的组播流量
实验易错点:
- RP的环回口地址没有加入OSPF(也可以指定物理接口)
- 检查交换机的是否开启了组播功能
以上内容均属原创,如有不详或错误,敬请指出。
本文链接:
https://blog.csdn.net/qq_45668124/article/details/106879488
版权声明:
本博客所有文章除特别声明外,均采用
CC BY-NC-SA 4.0
许可协议。转载请注明出处!并附带本文链接!