Multicast之ip pim Dense-mode

·PIM-DM ( Dense Mode )

密集模式原理:当第一跳路由器收到组播流量后,会向整个网络泛洪,网络中的每一个分枝都能收到流量,然后其中一些没有用户的分枝会自动进行修剪。

·Dense模式用的是源树的模型

·在Dense模式中Flood&prune 每三分钟就要做一次

·被剪掉的路由器如果有用户加组了,也会主动发出嫁接信息重新接收组播流量。


使用的5个PIMv2消息:
Hello
Join / Prune
Graft
Graft-Ack
Assert

★Hello消息:
PIMv2路由器使用Hello消息来发现邻居,并且周期性的在启动PIM的接口上发送Hello消息

Hello消息的时间间隔默认为30s
Ip pim query-interval //改变Hello消息间隔

Hello消息的超时时间自动设置为interval的3.5倍


★Join / Prune消息:
使用该消息加入或从某个多播组将自己剪除

当一个下游路由器被剪除,在(S.G)对中针对连接被剪除路由器的直连接口启用一个计时器,当计时器超时后,将从新进行Flood过程

★Graft消息:
当一台路由器将自己从一个多播组中剪除后,收到子网中主机的Report消息,这时,路由器会以单播发送Graft消息给上游路由器,上游路由器收到这个Graft消息后,将收到Graft消息的接口设置为前转状态,并立刻发送Graft-Ack消息给下游路由器

下游路由器发送Graft消息以后会等待Graft-Ack消息,等待时间为3s,若在3s内没有收到Graft-Ack消息,下游路由器将再次发送Graft消息给上游路由器

★Assert消息
在MA网络,防止多台多播路由器

Multicast之ip <wbr><wbr>pim <wbr><wbr>Dense-mode


R4#sh run
Building configuration...

Current configuration : 1190 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
ip multicast-routing --开启组播路由
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
no ip address
shutdown
half-duplex
!
interface Ethernet0/1
no ip address
shutdown
half-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
no ip address
shutdown
half-duplex
!
interface Serial1/0
ip address 24.1.1.1 255.255.255.0
ip pim dense-mode --设置为密集模式
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
no dce-terminal-timing-enable
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end

R2#sh run
Building configuration...

Current configuration : 1349 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
ip multicast-routing --开启组播路由
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
no ip address
shutdown
half-duplex
!
interface Ethernet0/1
no ip address
shutdown
half-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
no ip address
shutdown
half-duplex
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
ip pim dense-mode --设置为密集模式
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/1
ip address 24.1.1.2 255.255.255.0
ip pim dense-mode
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
no dce-terminal-timing-enable
!
router ospf 110 --配置IGP,建立组播树
router-id 2.2.2.2
log-adjacency-changes
network 12.1.1.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end

R1#sho run
Building configuration...

Current configuration : 1435 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
ip multicast-routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
ip address 16.1.1.1 255.255.255.0
ip pim dr-priority 3
ip pim dense-mode
half-duplex
!
interface Ethernet0/1
no ip address
shutdown
half-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
no ip address
shutdown
half-duplex
!
interface Serial1/0
ip address 13.1.1.1 255.255.255.0
ip pim dense-mode
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/1
ip address 12.1.1.2 255.255.255.0
ip pim dense-mode
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
no dce-terminal-timing-enable
!
router ospf 110
router-id 1.1.1.1
log-adjacency-changes
network 12.1.1.0 0.0.0.255 area 0
network 13.1.1.0 0.0.0.255 area 0
network 16.1.1.0 0.0.0.255 area 0
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end

R3 R6 PC配置省略,同上。

重点配置:

R1#sho 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

(*, 224.1.1.1), 00:06:26/stopped, RP 0.0.0.0, flags: D
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
Ethernet0/0, Forward/Dense, 00:06:26/00:00:00
Serial1/1, Forward/Dense, 00:06:26/00:00:00 ------显示了哪些接口启用了密集模式
Serial1/0, Forward/Dense, 00:06:26/00:00:00

(24.1.1.1, 224.1.1.1), 00:06:26/00:02:51, flags: T
Incoming interface: Serial1/1, RPF nbr 12.1.1.1
Outgoing interface list:
Serial1/0, Forward/Dense, 00:06:26/00:00:00
Ethernet0/0, Prune/Dense, 00:00:23/00:02:36-由于R6没有组员所以会向R1发出修剪消息(注意备注息)

(*, 224.0.1.40), 00:13:09/00:02:15, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
Ethernet0/0, Forward/Dense, 00:11:32/00:00:00
Serial1/1, Forward/Dense, 00:12:55/00:00:00 ------显示了哪些接口启用了密集模式
Serial1/0, Forward/Dense, 00:13:09/00:00:00
备注:(R6#sho ip igmp groups
IGMP Connected Group Membership
Group Address Interface Uptime Expires Last Reporter
224.0.1.40 Ethernet0/1 01:05:38 00:02:27 16.1.1.2 )


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章