以下实验是组播的综合实验,实验实现跨域的组播传递。
实验拓扑如下如:
实验要求:
组播源在AS123内,实现在AS 456里边的PC可以收到组播源发出的组播流量。
实验步骤:
1、各AS内部IGP路由互通,不能跨域访问。IP地址规划见以下配置清单;
2、路由器R1-R6,除了串口外,都启用PIM SM 功能;
3、R3和R4建立Ebgp对等体,以太网接口走组播流量,串口走单播流量;
4、R2和R5是各自区域的RP,使用MSDP协议建立对等体;
5、启用源,PC1加组。完成实验目的。
配置如下:
1、MCS1配置如图:红框部分模拟器有时候会变成全0,源注册会出问题。
2、PC1配置如下图:
路由器配置如下:
R1:
#
sysname R1
#全局模式下开启组播功能
multicast routing-enable
#除了串口,所有路由器的所有接口启用PIM SM
interface GigabitEthernet0/0/0
ip address 192.168.1.254 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/1
ip address 12.1.1.1 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/2
ip address 13.1.1.1 255.255.255.0
pim sm
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 12.1.1.1 0.0.0.0
network 13.1.1.1 0.0.0.0
network 192.168.1.0 0.0.0.255 #一定要宣告源所在的路由
#
路由R2的配置如下:
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/1
ip address 23.1.1.2 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
pim sm
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 12.1.1.2 0.0.0.0
network 23.1.1.2 0.0.0.0
#配置R2为RP
pim
c-bsr LoopBack0
c-rp LoopBack0
#和路由R5的loopback0接口5.5.5.5建立MSDP对等体关系
msdp
peer 5.5.5.5 connect-interface LoopBack0
#
R3配置如下:
#
multicast routing-enable
#
interface Serial4/0/0
link-protocol ppp
ip address 134.1.1.3 255.255.255.0
#
interface Serial4/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 13.1.1.3 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/1
ip address 23.1.1.3 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/2
ip address 34.1.1.3 255.255.255.0
pim bsr-boundary
pim sm
#
interface NULL0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
bgp 123
router-id 3.3.3.3
undo default ipv4-unicast
peer 34.1.1.4 as-number 456
peer 134.1.1.4 as-number 456
#
ipv4-family unicast
undo synchronization
network 2.2.2.2 255.255.255.255
network 192.168.1.0
undo peer 34.1.1.4 enable
peer 134.1.1.4 enable
#
ipv4-family multicast
undo synchronization
network 192.168.1.0
peer 34.1.1.4 enable
#
ospf 1 router-id 3.3.3.3
import-route bgp
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 13.1.1.3 0.0.0.0
network 23.1.1.3 0.0.0.0
#
R4的配置如下:
#
multicast routing-enable
#
interface Serial4/0/0
link-protocol ppp
ip address 134.1.1.4 255.255.255.0
#
interface Serial4/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 34.1.1.4 255.255.255.0
pim bsr-boundary
pim sm
#
interface GigabitEthernet0/0/1
ip address 45.1.1.4 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/2
ip address 46.1.1.4 255.255.255.0
pim sm
#
interface NULL0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
bgp 456
router-id 4.4.4.4
undo default ipv4-unicast
peer 34.1.1.3 as-number 123
peer 134.1.1.3 as-number 123
#
ipv4-family unicast
undo synchronization
network 5.5.5.5 255.255.255.255
undo peer 34.1.1.3 enable
peer 134.1.1.3 enable
#
ipv4-family multicast
undo synchronization
peer 34.1.1.3 enable
#
ospf 1 router-id 4.4.4.4
import-route bgp
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 45.1.1.4 0.0.0.0
network 46.1.1.4 0.0.0.0
#
R5的配置如下:
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
ip address 45.1.1.5 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/1
ip address 56.1.1.5 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
pim sm
#
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 5.5.5.5 0.0.0.0
network 45.1.1.5 0.0.0.0
network 56.1.1.5 0.0.0.0
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
msdp
peer 2.2.2.2 connect-interface LoopBack0
#
R6的配置如下:
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
ip address 46.1.1.6 255.255.255.0
pim sm
#
interface GigabitEthernet0/0/1
ip address 56.1.1.6 255.255.255.0
pim sm
#此接口运行igmp协议,是组播成员加组的末跳路由器
interface GigabitEthernet0/0/2
ip address 192.168.6.254 255.255.255.0
pim sm
igmp enable
#
interface NULL0
#
interface LoopBack0
ip address 6.6.6.6 255.255.255.255
#
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 6.6.6.6 0.0.0.0
network 46.1.1.6 0.0.0.0
network 56.1.1.6 0.0.0.0
#
有不明白的地方,欢迎留言讨论。
<完>.