好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



7组播典型配置

7.1        PIM-DM模式

【需求】

Multicast Source作为组播源,RECEIVER 1RECEIVER 2是该组播组的两个接收成员。

【组网图】

 

 

【配置脚本】

RouterA配置脚本

#

sysname RouterA

#

router id 1.1.1.1

#

multicast routing-enable            /开启组播路由功能/

#

radius scheme system

#

domain system

#

interface Ethernet2/0/0

ip address 10.1.1.1 255.255.255.0

pim dm                             /设置为pim-dm模式/

#

interface Serial1/0/0

link-protocol ppp

ip address 20.1.1.1 255.255.255.252

pim dm                             /设置为pim-dm模式/

#

interface Serial1/1/0

link-protocol ppp

ip address 30.1.1.1 255.255.255.252

pim dm                            /设置为pim-dm模式/

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

#

ospf 1

area 0.0.0.0

network 1.1.1.1 0.0.0.0

network 10.1.1.0 0.0.0.255

network 20.1.1.0 0.0.0.3

network 30.1.1.0 0.0.0.3

#

user-interface con 0

user-interface vty 0 4

#

return

RouterB配置脚本

#

sysname RouterB

#

router id 1.1.1.2

#

multicast routing-enable             /开启组播路由功能/

#

radius scheme system

#

domain system

#

interface Ethernet2/0/0

ip address 50.1.1.1 255.255.255.0

pim dm                               /设置为pim-dm模式/

#

interface Serial1/0/0

link-protocol ppp

ip address 20.1.1.2 255.255.255.252

pim dm                               /设置为pim-dm模式/

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.2 255.255.255.255

#

ospf 1

area 0.0.0.0

network 1.1.1.2 0.0.0.0

network 20.1.1.0 0.0.0.3

network 50.1.1.0 0.0.0.255

#

user-interface con 0

user-interface vty 0 4

#

return

RouterC配置脚本

#

sysname RouterC

#

router id 1.1.1.3

#

multicast routing-enable          /开启组播路由功能/

#

radius scheme system

#

domain system

#

interface Ethernet2/0/0

ip address 60.1.1.1 255.255.255.0

pim dm                            /设置为pim-dm模式/

#

interface Serial1/0/0

link-protocol ppp

ip address 30.1.1.2 255.255.255.252

pim dm                            /设置为pim-dm模式/

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.3 255.255.255.255

#

ospf 1

area 0.0.0.0

network 1.1.1.3 0.0.0.0

network 30.1.1.0 0.0.0.3

network 60.1.1.0 0.0.0.255

#

user-interface con 0

user-interface vty 0 4

#

return

 

【验证】

RouterA上的组播路由表:

[RouterA]disp multicast routing-table

Multicast Routing Table

Total 1 entry

(10.1.1.2, 226.1.1.1)

Uptime: 00:00:18, Timeout in 289 sec

Upstream interface: Ethernet2/0/0(10.1.1.1)

Downstream interface list: NULL

Matched 1 entry

 

【提示】

1PIM协议是独立于特定的单播路由协议的,所以这里我们不关心单播路由协议,假定各个路由器之间相互可达。

2、c-bsrc-rp推荐配置在同一台路由器上的loopback口上.

7.2        PIM-SM模式

【需求】

Multicast Source作为组播源,RECEIVER 1RECEIVER 2是该组播组的两个接收成员。

【组网图】

 

【配置脚本】

RouterA配置脚本

#

sysname RouterA

#

router id 1.1.1.1

#

multicast routing-enable                   /开启组播路由功能/

#

radius scheme system

#

domain system

#

acl number 2005

rule 0 permit source 225.0.0.0 0.0.0.255

#

interface Ethernet0/0/0

ip address 10.1.1.1 255.255.255.0

pim sm                                    /设置为pim-sm模式/

#

interface Serial1/0/0

link-protocol ppp

ip address 192.168.1.1 255.255.255.252

pim sm                                    /设置为pim-sm模式/

#

interface Serial1/1/0

link-protocol ppp

ip address 192.168.2.1 255.255.255.252

pim sm                                    /设置为pim-sm模式/

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

#

ospf 1

area 0.0.0.0

network 1.1.1.1 0.0.0.0

network 10.1.1.0 0.0.0.255

network 192.168.1.0 0.0.0.3

network 192.168.2.0 0.0.0.3

#

pim

spt-switch-threshold 10 group-policy 2005      /配置候选RP/

#

user-interface con 0

user-interface vty 0 4

#

return

RouterB配置脚本

#

sysname RouterB

#

router id 1.1.1.2

#

multicast routing-enable                   /开启组播路由功能/

#

radius scheme system

#

domain system

#

acl number 2005

rule 0 permit source 225.0.0.0 0.0.0.255

#

interface Serial1/0/0

link-protocol ppp

ip address 192.168.2.2 255.255.255.252

pim sm                                    /设置为pim-sm模式/

#

interface Serial1/1/0

link-protocol ppp

ip address 192.168.3.1 255.255.255.252

pim sm                                    /设置为pim-sm模式/

#

interface Serial4/0/0

link-protocol ppp

ip address 192.168.4.1 255.255.255.252

pim sm                                    /设置为pim-sm模式/

pim bsr-boundary                          /配置PIM边界/

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.2 255.255.255.255

#

ospf 1

area 0.0.0.0

network 1.1.1.2 0.0.0.0

network 192.168.2.0 0.0.0.3

network 192.168.3.0 0.0.0.3

network 192.168.4.0 0.0.0.3

#

pim

c-bsr Serial1/0/0 30 2                     /配置候选BSR/

#

user-interface con 0

user-interface vty 0 4

#

return

RouterC配置脚本

#

sysname RouterC

#

router id 1.1.1.3

#

multicast routing-enable                    /开启组播路由功能/

#

radius scheme system

#

domain system

#

interface Ethernet0/0/0

ip address 20.1.1.1 255.255.255.0

pim sm                                     /设置为pim-sm模式/

#

interface Serial1/0/0

link-protocol ppp

ip address 192.168.1.2 255.255.255.252

pim sm                                     /设置为pim-sm模式/

#

interface Serial1/1/0

link-protocol ppp

ip address 192.168.3.2 255.255.255.252

pim sm                                     /设置为pim-sm模式/

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.3 255.255.255.255

#

ospf 1

area 0.0.0.0

network 1.1.1.3 0.0.0.0

network 20.1.1.0 0.0.0.255

network 192.168.1.0 0.0.0.3

network 192.168.3.0 0.0.0.3

#

user-interface con 0

user-interface vty 0 4

#

return

 

 

RouterA配置脚本

 

RouterB配置脚本

 

RouterC配置脚本

 

 

 

X Close
X Close