PIM-SM组播实验

组播使用的协议为PIM,有两种模式,一种为Dense-mode,一种为sparse-mode。使用 sparse-mode需要RP的存在。今天的这篇文档就是sparse-mode,实验的重点是rp的设置。

关键命令:

1.启用组播,作用为激活路由器组播转发功能

Router(config)#ip multicast-routing

2.在接口上是能Pim sparse-mode,使路由器用于组播转发的接口工作在稀疏模式

Router(config-if)#ip pim sparse-mode

3.在路由器上指定RP。组播源将组播转发到RP,由RP进行路径选择与转发;组播接受者向RP申请组播。

Router(config)#ip pim rp-address (ip#) [(acl#)]
(ip#)用来指定RP的地址
(acl#)用来过滤组播组,作为源可以指定那些组播发往该RP;作为接受者可以设定那些组播从该RP接收。

这个实验是手动指定RP的,(注:在参与组播转发的每个路由器上进行设定。)

4.强制RP进行组播转发,禁止源转发。

Router(config-if)#ip the spt-threshold infinity


拓扑图

实验目的:

该网络的组播PIM设置为Sparse-mode,RP为10.1.1.1。所有组播强制由该RP转发。

具体配置:

R1#sh run
!
hostname R1
!
ip multicast-routing
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.252
ip pim sparse-mode
serial restart-delay 0
!
interface Serial0/1
ip address 192.168.1.5 255.255.255.252
ip pim sparse-mode
serial restart-delay 0
!
interface FastEthernet1/0
ip address 24.104.1.254 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
router rip
version 2
network 24.0.0.0
network 192.168.1.0
no auto-summary
!
ip pim rp-address 10.1.1.1
ip pim spt-threshold infinity
!
R2
!
ip multicast-routing
!
interface Serial0/0
ip address 192.168.1.2 255.255.255.252
ip pim sparse-mode
serial restart-delay 0
!
interface Serial0/1
ip address 192.168.1.9 255.255.255.252
ip pim sparse-mode
serial restart-delay 0
!
interface FastEthernet1/0
ip address 24.104.2.254 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
router rip
version 2
network 24.0.0.0
network 192.168.1.0
no auto-summary
!
ip pim rp-address 10.1.1.1
ip pim spt-threshold infinity


R3

ip multicast-routing
!
!
interface Loopback0
ip address 10.1.1.1 255.255.255.255
ip pim sparse-mode
!
interface Serial0/0
ip address 192.168.1.6 255.255.255.252
ip pim sparse-mode
serial restart-delay 0
!
interface Serial0/1
ip address 192.168.1.10 255.255.255.252
ip pim sparse-mode
serial restart-delay 0
!
router rip
version 2
network 10.0.0.0
network 192.168.1.0
no auto-summary
!
!
ip pim rp-address 10.1.1.1
ip pim spt-threshold infinity
!

实验结果:

R1

R1#sh ip mroute

IP Multicast Routing Table

Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,

L - Local, P - Pruned, R - RP-bit set, F - Register flag,

T - SPT-bit set, J - Join SPT, M - MSDP created entry,

X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,

U - URD, I - Received Source Specific Host Report,

Z - Multicast Tunnel, z - MDT-data group sender,

Y - Joined MDT-data group, y - Sending to MDT-data group

Outgoing interface flags: H - Hardware switched, A - Assert winner

Timers: Uptime/Expires

Interface state: Interface, Next-Hop or VCD, State/Mode

 

(*, 239.255.255.250), 00:02:36/00:02:25, RP 10.1.1.1, flags: SC

Incoming interface: Serial0/1, RPF nbr 192.168.1.6

Outgoing interface list:

FastEthernet1/0, Forward/Sparse, 00:02:36/00:02:25


(*, 225.0.0.1), 00:22:16/stopped, RP 10.1.1.1, flags: SCF

Incoming interface: Serial0/1, RPF nbr 192.168.1.6

Outgoing interface list:

FastEthernet1/0, Forward/Sparse, 00:03:34/00:02:25

 

(24.104.1.2, 225.0.0.1), 00:22:16/00:03:25, flags: FT

Incoming interface: FastEthernet1/0, RPF nbr 0.0.0.0

Outgoing interface list:

Serial0/1, Forward/Sparse, 00:22:15/00:02:53

 

(*, 224.0.1.40), 00:22:16/00:02:25, RP 10.1.1.1, flags: SCL

Incoming interface: Serial0/1, RPF nbr 192.168.1.6

Outgoing interface list:

FastEthernet1/0, Forward/Sparse, 00:22:16/00:02:25

R2#sh ip mroute

IP Multicast Routing Table

Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,

L - Local, P - Pruned, R - RP-bit set, F - Register flag,

T - SPT-bit set, J - Join SPT, M - MSDP created entry,

X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,

U - URD, I - Received Source Specific Host Report,

Z - Multicast Tunnel, z - MDT-data group sender,

Y - Joined MDT-data group, y - Sending to MDT-data group

Outgoing interface flags: H - Hardware switched, A - Assert winner

Timers: Uptime/Expires

Interface state: Interface, Next-Hop or VCD, State/Mode

 

(*, 239.255.255.250), 00:22:00/00:01:54, RP 10.1.1.1, flags: SC

Incoming interface: Serial0/1, RPF nbr 192.168.1.10

Outgoing interface list:

FastEthernet1/0, Forward/Sparse, 00:22:00/00:01:54

 

(*, 225.0.0.1), 00:22:39/00:02:59, RP 10.1.1.1, flags: SC   //R2不需要知道具体的源,只需要知道从哪个RP获取该组播

Incoming interface: Serial0/1, RPF nbr 192.168.1.10

Outgoing interface list:

FastEthernet1/0, Forward/Sparse, 00:22:39/00:02:56

 

(*, 224.0.1.40), 00:22:39/stopped, RP 10.1.1.1, flags: SPCL

Incoming interface: Serial0/1, RPF nbr 192.168.1.10

Outgoing interface list: Null

 

R3#sh ip mroute

IP Multicast Routing Table

Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,

L - Local, P - Pruned, R - RP-bit set, F - Register flag,

T - SPT-bit set, J - Join SPT, M - MSDP created entry,

X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,

U - URD, I - Received Source Specific Host Report,

Z - Multicast Tunnel, z - MDT-data group sender,

Y - Joined MDT-data group, y - Sending to MDT-data group

Outgoing interface flags: H - Hardware switched, A - Assert winner

Timers: Uptime/Expires

Interface state: Interface, Next-Hop or VCD, State/Mode

 

(*, 239.255.255.250), 00:22:26/00:03:04, RP 10.1.1.1, flags: S

Incoming interface: Null, RPF nbr 0.0.0.0

Outgoing interface list:

Serial0/0, Forward/Sparse, 00:03:23/00:03:04

Serial0/1, Forward/Sparse, 00:22:19/00:02:50

 

(*, 225.0.0.1), 00:23:03/00:03:16, RP 10.1.1.1, flags: S

Incoming interface: Null, RPF nbr 0.0.0.0

Outgoing interface list:

Serial0/0, Forward/Sparse, 00:04:21/00:03:16

Serial0/1, Forward/Sparse, 00:23:01/00:03:13

 

(24.104.1.2, 225.0.0.1), 00:23:03/00:03:23, flags: T

Incoming interface: Serial0/0, RPF nbr 192.168.1.5

Outgoing interface list:

Serial0/1, Forward/Sparse, 00:23:01/00:03:13

 

(*, 224.0.1.40), 00:23:08/00:03:15, RP 10.1.1.1, flags: SJCL

Incoming interface: Null, RPF nbr 0.0.0.0

Outgoing interface list:

Serial0/1, Forward/Sparse, 00:23:00/00:03:09

Serial0/0, Forward/Sparse, 00:23:09/00:03:14

 

 

 

R1#sh ip pim neighbor

PIM Neighbor Table

Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,

S - State Refresh Capable

Neighbor Interface Uptime/Expires Ver DR

Address Prio/Mode

192.168.1.2 Serial0/0 00:31:35/00:01:41 v2 1 / S

192.168.1.6 Serial0/1 00:31:41/00:01:33 v2 1 / S

 

 

R1#sh ip pim rp

Group: 239.255.255.250, RP: 10.1.1.1, v2, uptime 00:04:35, expires never

Group: 225.0.0.1, RP: 10.1.1.1, v2, uptime 00:24:15, expires never

Group: 224.0.1.40, RP: 10.1.1.1, v2, uptime 00:24:15, expires never

 

R2#sh ip pim rp

Group: 239.255.255.250, RP: 10.1.1.1, uptime 00:24:15, expires never

Group: 225.0.0.1, RP: 10.1.1.1, uptime 00:24:54, expires never

Group: 224.0.1.40, RP: 10.1.1.1, uptime 00:24:54, expires never

 

 

R3#sh ip pim rp

Group: 239.255.255.250, RP: 10.1.1.1, next RP-reachable in 00:00:51

Group: 225.0.0.1, RP: 10.1.1.1, next RP-reachable in 00:00:14

Group: 224.0.1.40, RP: 10.1.1.1, next RP-reachable in 00:00:0

 

 

 

 

你可能感兴趣的:(休闲,实验,组播,RP,Sparse模式)