天天看點

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 pim 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

interface Ethernet0/2

interface Ethernet0/3

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

interface Serial1/2

interface Serial1/3

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

Current configuration : 1349 bytes

hostname R2

ip address 12.1.1.1 255.255.255.0

ip address 24.1.1.2 255.255.255.0

ip pim dense-mode

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

R1#sho run

Current configuration : 1435 bytes

hostname R1

ip multicast-routing

ip address 16.1.1.1 255.255.255.0

ip pim dr-priority 3

ip address 13.1.1.1 255.255.255.0

ip address 12.1.1.2 255.255.255.0

router ospf 110

router-id 1.1.1.1

network 13.1.1.0 0.0.0.255 area 0

network 16.1.1.0 0.0.0.255 area 0

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

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

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 )

繼續閱讀