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 )


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