PIM-SM协议原理

合集下载

PIM技术介绍-2017.04.18

PIM技术介绍-2017.04.18

PIM技术介绍目录1 PIM简介 (2)1.1 PIM-DM 简介 (2)1.2 PIM-DM 工作机制 (2)1.2.1邻居发现 (2)1.2.2构建SPT (3)1.2.3嫁接 (3)1.2.4断言 (4)1.3 PIM-SM 简介 (4)1.4 PIM-SM 工作机制 (5)1.4.1邻居发现 (5)1.4.2DR 选举 (5)1.4.3RP发现 (6)1.4.4构建RPT (8)1.4.5组播源注册 (8)1.4.6RPT 向SPT 切换 (9)1.4.7断言 (9)1.5 SSM 模型在PIM 中的实现 (10)1.5.1邻邻居发现 (10)1.5.2DR 选举 (10)1.5.3构建SPT (10)2 PIM协议报文格式 (12)2.1 PIM报文通用格式 (12)2.2 PIM Hello消息格式 (13)2.3 PIM Register消息格式 (15)2.4 PIM Register-Stop消息格式 (17)2.5 PIM Join/Prune消息格式 (18)2.6 PIM Graft/Graft-Ack消息格式 (21)2.7 PIM Bootstrap消息格式 (23)2.8 PIM Assert消息格式 (26)2.9 PIM C-RP Advertisement消息格式 (27)3 组播相关概念 (30)3.1 IP组播三种的传递方式 (30)3.2 IP组播技术体系结构 (30)1 PIM简介PIM 是Protocol Independent Multicast(协议无关组播)的简称,表示可以利用静态路由或者任意单播路由协议(包括RIP、OSPF、IS-IS、BGP 等)所生成的单播路由表为IP 组播提供路由。

组播路由与所采用的单播路由协议无关,只要能够通过单播路由协议产生相应的组播路由表项即可。

PIM 借助RPF(Reverse PathForwarding,逆向路径转发)机制实现对组播报文的转发。

MSDP简介

MSDP简介

MSDP简介MSDP(Multicast Source Discovery Protocol)称为组播源发现协议,是基于多个PIM-SM(Protocol Independent Multicast Sparse Mode)域互连而开发的一种域间组播解决方案。

适用条件:域内组播路由协议必须是PIM-SM。

MSDP仅对ASM(Any-Source Multicast)模型有意义。

一.PIM-SM域由多个PIM-SM路由器相连,组成的网络称为PIM-SM网络。

一个大的PIM-SM网络可能由多个ISP(Internet Service Provider)联合维护。

PIM-SM网络依靠RP(Rendezvous Point)实现组播转发,将一个大的PIM-SM网络划分为多个区域,每个区域内维护一个RP,可以实现RP负荷分担、增强网络的稳定性,且益于管理。

每一个这样的区域,称为一个PIM-SM域。

1.如果PIM-SM域中使用静态RP,则该区域内的所有PIM-SM路由器都必须依靠静态配置来获得RP信息。

不在区域以外的路由器上设置此静态RP,就可以划定PIM-SM域的范围。

2.如果PIM-SM域中使用C-RP,则该区域内的所有PIM-SM路由器都必须依靠BSR获得RP的信息。

由于Bootstrap消息不能通过“BSR边界”,在位于区域边缘的路由器接口上设置“BSR边界”,就可以划定PIM-SM域的范围。

二.MSDP实现域间组播由于PIM-SM域间RP信息隔离,组播源只向本域内的RP注册,用户主机只向本域内的RP发起加入。

由于不同PIM-SM域的RP之间无法通信,所以RP知道且仅知道本域内的组播源,只能将本域内的组播源发出的数据分发放给本地用户。

因此,将一个大的PIM-SM网络划分为多个PIM-SM域后,出现了一个严重的问题:如何实现域间组播,使本PIM-SM域内的用户主机接收到其它域内组播源发出的组播数据。

MSDP应运而生,使不同PIM-SM域的RP之间能够通信,共享组播源信息。

PIM简介

PIM简介

PIM简介组播源向组播地址发出组播报文,经过中间网络路由到达组播组所有成员。

为使中间网络能够实现组播报文的复制和转发,必须为网络中的路由器配置组播路由协议。

PIM(Protocol Independent Multicast)称为协议无关组播,作为一种组播路由解决方案,在实践中得到广泛的应用。

一.PIM转发基础网络中单播路由畅通是PIM转发的基础。

PIM利用现有的单播路由信息,对组播报文执行RPF(Reverse Path Forwarding)检查,从而创建组播路由表项,构建组播分发树。

PIM不维护专门的单播路由,也不依赖某具体的单播路由协议,它直接利用单播路由的结果。

为PIM提供单播路由信息的可以是静态路由、RIP、OSPF、IS-IS、BGP等任何一种单播路由协议。

二.PIM支持的组播模型ASM(Any-Source Multicast)模型ASM(Any-Source Multicast)模型目前包括PIM-DM(Protocol Independent Multicast Dense Mode)和PIM-SM (Protocol Independent Multicast Sparse Mode)两种模式:●PIM-DM称为协议独立组播-密集模式。

适合规模较小、组播组成员相对比较密集的局域网。

●PIM-SM称为协议独立组播-稀疏模式。

适合网络中的组成员相对比较稀疏,分布广泛的大型网络。

有关专家在47个组播节点,5个组播源的网络环境下,分别应用PIM-DM和PIM-SM,测量了数据报文和控制报文占用的网络带宽、路由器的处理开销。

实验的结果如表1-1。

表1-1组播协议实验结果考察对象组播成员分布状况试验结果占用的网络带宽大于42%PIM-SM发出的包比PIM-DM多。

小于42%PIM-SM发出的包比PIM-DM少。

路由器上的路由表项个数小于32% PIM-SM协议维护的路由表项个数少。

32%~58% 两种路由协议情况下,路由表项个数相当。

PIM静态路由技术介绍简介

PIM静态路由技术介绍简介

PIM技术介绍目录1 PIM简介 (2)1.1 PIM-DM 简介 (2)1.2 PIM-DM 工作机制 (2)1.2.1邻居发现 (2)1.2.2构建SPT (3)1.2.3嫁接 (3)1.2.4断言 (4)1.3 PIM-SM 简介 (4)1.4 PIM-SM 工作机制 (5)1.4.1邻居发现 (5)1.4.2DR 选举 (5)1.4.3RP发现 (6)1.4.4构建RPT (8)1.4.5组播源注册 (8)1.4.6RPT 向SPT 切换 (9)1.4.7断言 (9)1.5 SSM 模型在PIM 中的实现 (10)1.5.1邻邻居发现 (10)1.5.2DR 选举 (10)1.5.3构建SPT (10)2 PIM协议报文格式 (12)2.1 PIM报文通用格式 (12)2.2 PIM Hello消息格式 (13)2.3 PIM Register消息格式 (15)2.4 PIM Register-Stop消息格式 (17)2.5 PIM Join/Prune消息格式 (18)2.6 PIM Graft/Graft-Ack消息格式 (21)2.7 PIM Bootstrap消息格式 (23)2.8 PIM Assert消息格式 (26)2.9 PIM C-RP Advertisement消息格式 (27)3 组播相关概念 (30)3.1 IP组播三种的传递方式 (30)3.2 IP组播技术体系结构 (30)1 PIM简介PIM 是Protocol Independent Multicast(协议无关组播)的简称,表示可以利用静态路由或者任意单播路由协议(包括RIP、OSPF、IS-IS、BGP 等)所生成的单播路由表为IP 组播提供路由。

组播路由与所采用的单播路由协议无关,只要能够通过单播路由协议产生相应的组播路由表项即可。

PIM 借助RPF(Reverse PathForwarding,逆向路径转发)机制实现对组播报文的转发。

RPF机制,PIM-DM工作机制,PIM-SM工作机制

RPF机制,PIM-DM工作机制,PIM-SM工作机制

RPF机制,PIM-DM工作机制,PIM-SM工作机制一、组播的RPF机制路由器在接收到由源S 向组播组G 发送的组播报文后,首先查找组播转发表。

∙如果存在对应(S,G)表项,且该组播报文实际到达接口与Incoming interface 一致,则向所有的outgoing interfaces 执行转发;∙如果存在对应(S,G)表项,但是报文实际到达接口与Incoming interface 不一致,则对此报文执行RPF 检查。

如果检查通过,则将Incoming interface 修改为报文实际到达接口,然后向所有的outgoing interfaces 执行转发。

∙如果不存在对应(S,G)表项,则对此报文执行RPF 检查。

如果检查通过,则根据相关路由信息,创建对应路由表项,然后向所有的outgoing interfaces 执行转发。

RPF 检查执行过程如下:在单播路由表中查找RPF接口。

单播路由表中汇集了到达各个目的地址的最短路径。

∙如果当前组播路径沿袭从组播源S 到客户端的SPT 或组播源S 到RP的源树,则路由器以源S 的IP 地址为目的地址查找单播路由表,对应表项中的出接口为RPF接口。

路由器认为由该RPF 接口接收到的组播报文所经历的路径是从源S 到本地的最短路径。

∙如果当前组播路径沿袭从RP 到客户端的RPT,则路由器以RP 的IP 地址为目的地址查找单播路由表,对应表项中的出接口为RPF 接口。

路由器认为由该RPF 接口接收到的组播报文所经历的路径是从RP 到本地的最短路径。

∙将RPF 接口与组播报文的实际到达接口相比较,判断到达路径的正确性,从而决定是否进行转发。

∙如果两接口相一致,那么就认为这个组播包是从正确路径而来,RPF 检查成功。

∙如果两接口不一致,将该组播报文丢弃。

作为路径判断依据的单播路由信息可以来源于任何一种单播路由协议、组播静态路由或者MBGP 路由协议。

当组播路径沿袭从组播源到客户端的SPT 时,RPF 检查过程如图13-1 所示。

PIM-SM(rfc4601)

PIM-SM(rfc4601)

Network Working Group D. Farinacci Request for Comments: 4610 Y. Cai Category: Standards Track Cisco Systems August 2006 Anycast-RP Using Protocol Independent Multicast (PIM)Status of This MemoThis document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions forimprovements. Please refer to the current edition of the "InternetOfficial Protocol Standards" (STD 1) for the standardization stateand status of this protocol. Distribution of this memo is unlimited. Copyright NoticeCopyright (C) The Internet Society (2006).AbstractThis specification allows Anycast-RP (Rendezvous Point) to be usedinside a domain that runs Protocol Independent Multicast (PIM) only. Other multicast protocols (such as Multicast Source DiscoveryProtocol (MSDP), which has been used traditionally to solve thisproblem) are not required to support Anycast-RP.1. IntroductionAnycast-RP as described in [I1] is a mechanism that ISP-basedbackbones have used to get fast convergence when a PIM RendezvousPoint (RP) router fails. To allow receivers and sources toRendezvous to the closest RP, the packets from a source need to getto all RPs to find joined receivers.This notion of receivers finding sources is the fundamental problemof source discovery that MSDP was intended to solve. However, if one would like to retain the Anycast-RP benefits from [I1] with lessprotocol machinery, removing MSDP from the solution space is anoption.This memo extends the Register mechanism in PIM so Anycast-RPfunctionality can be retained without using MSDP.Farinacci & Cai Standards Track [Page 1]1.1. TerminologyThe key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT","SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [N2].2. Overviewo A unicast IP address is chosen to use as the RP address. Thisaddress is statically configured, or distributed using a dynamicprotocol, to all PIM routers throughout the domain.o A set of routers in the domain is chosen to act as RPs for this RP address. These routers are called the Anycast-RP set.o Each router in the Anycast-RP set is configured with a loopbackinterface using the RP address.o Each router in the Anycast-RP set also needs a separate IP address, to be used for communication between the RPs.o The RP address, or a prefix that covers the RP address, is injected into the unicast routing system inside of the domain.o Each router in the Anycast-RP set is configured with the addresses of all other routers in the Anycast-RP set. This must beconsistently configured in all RPs in the set.3. MechanismThe following diagram illustrates a domain using 3 RPs wherereceivers are joining to the closest RP according to where unicastrouting metrics take them and 2 sources sending packets to theirrespective RPs.The rules described in this section do not override the rules in[N1]. They are intended to blend with the rules in [N1]. If thereis any question on the interpretation, precedent is given to [N1].S1-----RP1 RP2 RP3------S3/ \ |/ \ |R1 R1’ R2Farinacci & Cai Standards Track [Page 2]Assume the above scenario is completely connected where R1, R1’, and R2 are receivers for a group, and S1 and S3 send to that group.Assume RP1, RP2, and RP3 are all assigned the same IP address, which is used as the Anycast-RP address (let’s say the IP address is RPA). Note, the address used for the RP address in the domain (theAnycast-RP address) needs to be different than the addresses used by the Anycast-RP routers to communicate with each other.The following procedure is used when S1 starts sourcing traffic:o S1 sends a multicast packet.o The designated router (DR) directly attached to S1 will form a PIM Register message to send to the Anycast-RP address (RPA). Theunicast routing system will deliver the PIM Register message to the nearest RP, in this case RP1.o RP1 will receive the PIM Register message, decapsulate it, and send the packet down the shared-tree to get the packet to receivers R1and R1’.o RP1 is configured with RP2 and RP3’s IP address. Since theRegister message did not come from one of the RPs in the anycast-RP set, RP1 assumes the packet came from a DR. If the Register is not addressed to the Anycast-RP address, an error has occurred and itshould be rate-limited logged.o RP1 will then send a copy of the Register message from S1’s DR toboth RP2 and RP3. RP1 will use its own IP address as the sourceaddress for the PIM Register message.o RP1 MAY join back to the source-tree by triggering a (S1,G) Joinmessage toward S1. However, RP1 MUST create (S1,G) state.o RP1 sends a Register-Stop back to the DR. If, for some reason, the Register messages to RP2 and RP3 are lost, then when the Registersuppression timer expires in the DR, it will resend Registers toallow another chance for all RPs in the Anycast-RP set to obtainthe (S,G) state.o RP2 receives the Register message from RP1, decapsulates it, andalso sends the packet down the shared-tree to get the packet toreceiver R2.o RP2 sends a Register-Stop back to RP1. RP2 MAY wait to send theRegister-Stop if it decides to join the source-tree. RP2 shouldwait until it has received data from the source on the source-tree Farinacci & Cai Standards Track [Page 3]before sending the Register-Stop. If RP2 decides to wait, theRegister-Stop will be sent when the next Register is received. If RP2 decides not to wait, the Register-Stop is sent now.o RP2 MAY join back to the source-tree by triggering a (S1,G) Joinmessage toward S1. However, RP2 MUST create (S1,G) state.o RP3 receives the Register message from RP1, decapsulates it, butsince there are no receivers joined for the group, it can discardthe packet.o RP3 sends a Register-Stop back to RP1.o RP3 creates (S1,G) state so when a receiver joins after S1 startssending, RP3 can join quickly to the source-tree for S1.o RP1 processes the Register-Stop from each of RP2 and RP3. There is no specific action taken when processing Register-Stop messages.The procedure for S3 sending follows the same as above but it is RP3 that sends a copy of the Register originated by S3’s DR to RP1 andRP2. Therefore, this example shows how sources anywhere in thedomain, associated with different RPs, can reach all receivers, also associated with different RPs, in the same domain.4. Observations and Guidelines about This Proposalo An RP will send a copy of a Register only if the Register isreceived from an IP address not in the Anycast-RP list (i.e., theRegister came from a DR and not another RP). An implementationMUST safeguard against inconsistently configured Anycast-RP sets in each RP by copying the Time to Live (TTL) from a Register messageto the Register messages it copies and sends to other RPs.o Each DR that PIM registers for a source will send the message tothe Anycast-RP address (which results in the packet getting to the closest physical RP). Therefore, there are no changes to the DRlogic.o Packets flow to all receivers no matter what RP they have joinedto.o The source gets Registered to a single RP by the DR. It’s theresponsibility of the RP that receives the PIM Register messagesfrom the DR (the closest RP to the DR based on routing metrics) to get the packet to all other RPs in the Anycast-RP set.Farinacci & Cai Standards Track [Page 4]o Logic is changed only in the RPs. The logic change is for sending copies of Register messages. Register-Stop processing isunchanged. However, an implementation MAY suppress sendingRegister-Stop messages in response to a Register received from anRP.o The rate-limiting of Register and Register-Stop messages are doneend-to-end. That is from DR -> RP1 -> {RP2 and RP3}. There is no need for specific rate-limiting logic between the RPs.o When topology changes occur, the existing source-tree adjusts as it does today according to [N1]. The existing shared-trees, as well, adjust as they do today according to [N1].o Physical RP changes are as fast as unicast route convergence,retaining the benefit of [I1].o An RP that doesn’t support this specification can be mixed with RPs that do support this specification. However, the non-supporter RP should not have sources registering to it, but may have receiversjoined to it.o If Null Registers are sent (Registers with an IP header and no IPpayload), they MUST be replicated to all of the RPs in theAnycast-RP set so that source state remains alive for activesources.o The number of RPs in the Anycast-RP set should remain small so the amount of non-native replication is kept to a minimum.o Since the RP, who receives a Register from the DR, will send copies of the Register to the other RPs at the same time it sends aRegister-Stop to the DR, there could be packet loss and lost state in the other RPs until the time the DR sends Register messagesagain.5. Interaction with MSDP Running in an Anycast-PIM RouterThe objective of this Anycast-PIM proposal is to remove thedependence on using MSDP. This can be achieved by removing MSDPpeering between the Anycast-RPs. However, to advertise internalsources to routers outside of a PIM routing domain and to learnexternal sources from other routing domains, MSDP may still berequired.Farinacci & Cai Standards Track [Page 5]5.1. Anycast-PIM Stub Domain FunctionalityIn this capacity, when there are internal sources that need to beadvertised externally, an Anycast-RP that receives a Registermessage, either from a DR or an Anycast-RP, should process it asdescribed in this specification as well as how to process a Register message as described in [N1]. That means a Source-Active (SA) forthe same internal source could be originated by multiple Anycast-RPs doing the MSDP peering. There is nothing inherently wrong with this other than that the source is being advertised into the MSDPinfrastructure from multiple places from the source domain. However, if this is not desirable, configuration of one or more (rather thanall) Anycast-RP MSDP routers would allow only those routers tooriginate SAs for the internal source. And in some situations, there is a good possibility not all Anycast-RPs in the set will have MSDPpeering sessions so this issue can be mitigated to a certain extent. From an Anycast-RP perspective, a source should be consideredinternal to a domain when it is discovered by an Anycast-RP through a received Register message, regardless of whether the Register message was sent by a DR, another Anycast-RP member, or the router itself.For learning sources external to a domain, the MSDP SA messages could arrive at multiple MSDP-peering Anycast-RPs. The rules forprocessing an SA, according to [I1], should be followed. That is, if G is joined in the domain, an (S,G) join is sent towards the source. And if data accompanies the SA, each Anycast-PIM RP doing MSDPpeering will forward the data down each of its respective shared-trees.The above assumes each Anycast-RP has external MSDP peeringconnections. If this is not the case, the Anycast-PIM routers withthe MSDP peering connections would follow the same procedure as if a Data-Register or Null-Register was received from either a DR oranother Anycast-RP. That is, they would send Registers to the other members of the Anycast-RP set.If there is a mix of Anycast-RPs that do and do not have externalMSDP peering connections, then the ones that do must be configuredwith the set that do not. So Register messages are sent only to the members of the Anycast-RP set that do not have external MSDP peering connections.The amount of Register traffic generated by this MSDP-peering RPwould be equal to the number of active sources external to thedomain. The Source-Active state would have to be conveyed to allother RPs in the Anycast-RP set since the MSDP-peering RP would notknow about the group membership associated with the other RPs. To Farinacci & Cai Standards Track [Page 6]avoid this periodic control traffic, it is recommended that allAnycast-RPs be configured with external MSDP peering sessions so noRP in the Anycast-RP set will have to originate Register messages on behalf of external sources.5.2. Anycast-PIM Transit Domain FunctionalityWithin a routing domain, it is recommended that an Anycast-RP setdefined in this specification should not be mixed with MSDP peeringamong the members. In some cases, the source discovery will work but it may not be obvious to the implementations which sources are local to the domain and which are not. This may affect external MSDPadvertisement of internal sources.Having said that, this document makes no attempt to connect MSDPpeering domains together by using Anycast-PIM inside a transitdomain.6. Security ConsiderationThis section describes the security consideration for Register andRegister-Stop messages between Anycast-RPs. For PIM messages between DR and RP, please see [N1].6.1. Attack Based On Forged MessagesAn attacker may forge a Register message using one of the addressesin the Anycast-RP list in order to achieve one or more of thefollowing effects:1. Overwhelm the target RP in a denial-of-service (DoS) attack2. Inject unauthorized data to receivers served by the RP3. Inject unauthorized data and create bogus SA entries in otherPIM domains if the target RP has external MSDP peeringsAn attacker may also forge a Register-Stop message using one of theaddresses in the Anycast-RP list. However, besides denial-of-service, the effect of such an attack is limited because an RPusually ignores Register-Stop messages.6.2. Protect Register and Register-Stop MessagesThe DoS attack using forged Register or Register-Stop messages cannot be prevented. But the RP can still be protected. For example, theRP can rate-limit incoming messages. It can also choose to refuse to process any Register-Stop messages. The actual protection mechanism is implementation specific.Farinacci & Cai Standards Track [Page 7]The distribution of unauthorized data and bogus Register messages can be prevented using the method described in section 6.3.2 of [N1].When RP1 sends a copy of a register to RP2, RP1 acts as [N1]describes the DR and RP2 acts as [N1] describes the RP.As described in [N1], an RP can be configured using a unique SA andSecurity Parameter Index (SPI) for traffic (Registers or Register-Stops) to each member of Anycast-RPs in the list, but this results in a key management problem; therefore, it may be preferable in PIMdomains where all Rendezvous Points are under a single administrative control to use the same authentication algorithm parameters(including the key) for all Registered packets in a domain.7. AcknowledgementsThe authors prototyped this document in the cisco IOS and Procketimplementations, respectively.The authors would like to thank John Zwiebel for doinginteroperability testing of the two prototype implementations.The authors would like to thank Thomas Morin from France Telecom for having an extensive discussion on Multicast the Registers to an SSM- based full mesh among the Anycast-RP set. This idea may come in asubsequent document.And finally, the authors would like to thank the following for their comments on earlier drafts:Greg Shepherd (Procket Networks (now Cisco Systems))Lenny Giuliano (Juniper Networks)Prashant Jhingran (Huawei Technologies)Pekka Savola (CSC/FUNET)Bill Fenner (AT&T)James Lingard (Data Connection)Amit Shukla (Juniper Networks)Tom Pusateri (Juniper Networks)Farinacci & Cai Standards Track [Page 8]8. References8.1. Normative References[N1] Fenner, B., Handley, M., Holbrook, H., and I. Kouvelas,"Protocol Independent Multicast - Sparse Mode (PIM-SM):Protocol Specification (Revised)", RFC 4601, August 2006.[N2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.8.2. Informative References[I1] Kim, D., Meyer, D., Kilmer, H., and D. Farinacci, "AnycastRendevous Point (RP) mechanism using Protocol IndependentMulticast (PIM) and Multicast Source Discovery Protocol (MSDP)", RFC 3446, January 2003.Farinacci & Cai Standards Track [Page 9]Appendix A: Possible Configuration LanguageA possible set of commands to be used could be:ip pim anycast-rp <anycast-rp-addr> <rp-addr>Where:<anycast-rp-addr> describes the Anycast-RP set for the RP that is assigned to the group range. This IP address is the address that first-hop and last-hop PIM routers use to register and join to.<rp-addr> describes the IP address where Register messages copies are sent to. This IP address is any address assigned to the RProuter not including the <anycast-rp-addr>.Example:From the illustration above, the configuration commands would be: ip pim anycast-rp RPA RP1ip pim anycast-rp RPA RP2ip pim anycast-rp RPA RP3Comment:It may be useful to include the local router IP address in thecommand set so the above lines can be cut-and-pasted or scriptedinto all the RPs in the Anycast-RP set.But the implementation would have to be aware of its own addressand not inadvertently send a Register to itself.Farinacci & Cai Standards Track [Page 10]Authors’ AddressesDino FarinacciCisco SystemsEMail: dino@Yiqun CaiCisco SystemsEMail: ycai@Farinacci & Cai Standards Track [Page 11]Full Copyright StatementCopyright (C) The Internet Society (2006).This document is subject to the rights, licenses and restrictionscontained in BCP 78, and except as set forth therein, the authorsretain all their rights.This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNETENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THEINFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIEDWARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual PropertyThe IETF takes no position regarding the validity or scope of anyIntellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described inthis document or the extent to which any license under such rightsmight or might not be available; nor does it represent that it hasmade any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can befound in BCP 78 and BCP 79.Copies of IPR disclosures made to the IETF Secretariat and anyassurances of licenses to be made available, or the result of anattempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of thisspecification can be obtained from the IETF on-line IPR repository at /ipr.The IETF invites any interested party to bring to its attention anycopyrights, patents or patent applications, or other proprietaryrights that may cover technology that may be required to implementthis standard. Please address the information to the IETF atietf-ipr@.AcknowledgementFunding for the RFC Editor function is provided by the IETFAdministrative Support Activity (IASA).Farinacci & Cai Standards Track [Page 12]。

烽火网络PIMSM技术白皮书

烽火网络PIMSM技术白皮书

烽火网络PIMSM技术白皮书 1.组播路由协议概述 (1)2. PIMSM协议介绍 (2)2.1. RPT和RP (2)2.2. PIM邻居 (3)2.3. RPT的添加和裁剪 (3)2.4. 组播数据转发 (5)2.5. SPT倒换 (6)2.6. 声明过程 (8)2.7. RP和BSR (8)2.8. 软状态 (9)3. PIMSM的配置 (9)3.1. 配置PIMSM协议 (9)3.2. 配置PIMSM接口 (10)3.3. 配置候选RP (10)3.4. 配置候选BSR (11)3.5. 配置SPT倒换的容限 (12)3.6. PIMSM调试信息 (12)4.结论 (15)1. 组播路由协议概述随着IP网络的发展,各种组播业务也得到了发展。

组播数据是从一个源发送到多个接收目的地,传统的单播路由必须确定每一个目的地的地址,并分别发送不同的数据包,而组播则可以通过一个组播地址只发送一个数据包的拷贝。

和单播需要单播路由一样,组播也需要组播路由的支持,目前有许多组播路由协议,如DVMRP,MSDP,MBGP,MOSPF,PIMSM,PIMDM等。

 PIMSM是当前应用较为广泛的组播协议,它的全称是协议无关组播的稀疏模式。

协议无关是指与底层使用的单播路由协议无关,可以使用任何单播路由协议提供的单播路由,稀疏模式则是针对密集模式而言的。

稀疏模式的基本观点是主机必须请求之后才能够接收数据,而密集模式则是先认为主机需要接收数据。

稀疏模式通常用于较大的网络当中,而密集模式则适用于较小规模,组播成员较为密集的网络。

 烽火网络的PIMSM遵循以下标准: ※ RFC 2117—Protocol Independent Multicast-Sparse Mode(PIM-SM):protocol specification※ RFC 2362—Protocol Independent Multicast-Sparse Mode(PIM-SM):protocol specification※ Draft-itef-pim-sm-new-03-Protocol Independent Multicast-Sparse Mode(PIM -SM): protocol specification(Revised)※ RFC 2934——Protocol Independent Multicast MIB for IPv42. PIMSM协议介绍2.1.RPT和RP反向路径树(RPT)是PIMSM的基本概念。

PIM-SM

PIM-SM
Ethernet0/1, Protocol 0x100: RPT, timeout in 161 sec (192.168.1.2, 224.1.1.1)
Protocol 0x20: pim-sm, Flag 0x80004: SPT Uptime: 00:22:44, Timeout in 200 sec Upstream interface: Ethernet0/0, RPF neighbor:ace list: NULL
Host A
N1
Receiver
Source
POS 2/0/0
RTD
.2
RTE
RT BGE 2/0/0 10.110.2.1/24
GE 3/0/0
10.110.5.1/24
POS 2/0/0
192.168.3.1/24
POS 4/0/0
POS 1/0/0 192.168.4.2/24
192.168.4.1/24
数据流
(S, G) 加入
源路径树

RP

接收者
Page20
停止注册过程
数据流从组播源通 过源路径树到达RP
组播源
数据流
共享树
源路径树
(S, G)注册 (S, G) 注册停止
(单播) (单播)
RP
RP向第一跳路由器 发送注册停止( Register-Stop)消 息,停止注册过程
接收者
Page21
组播流转发过程
源数据流沿源树 (SPT)流向RP
RP 组播源
数据流 共享树 源路径树
从RP开始,数据流沿共享 树(RPT)流向接收者
接收者
Page22
RPT向SPT切换

华为交换机 01-04 PIM-SM(IPv4)配置

华为交换机 01-04 PIM-SM(IPv4)配置

4 PIM-SM(IPv4)配置关于本章通过配置PIM协议,可以实现域内组播路由与数据转发。

PIM-SM是稀疏模式的域内组播路由协议,适用于组成员分布相对分散、范围较广的大规模网络。

注意事项端口作为VPLS AC侧的接入端口时,如果该端口同时还作为组播流入接口,会导致对应组播数据无法正常转发。

4.1 PIM-SM(IPv4)概述介绍PIM-SM的适用范围及基本原理。

4.2 设备支持的PIM-SM(IPv4)特性设备支持的PIM-SM特性有:PIM-SM for ASM、PIM-SM for SSM、PIM BFD。

4.3 缺省配置介绍缺省情况下,PIM-SM的配置信息。

4.4 配置ASM模型的PIM-SM通过配置ASM模型的PIM-SM,可为用户主机提供任意源组播服务,加入同一组播组的用户主机都能收到任意源发往该组的组播数据。

4.5 配置SSM模型的PIM-SM通过配置SSM模型的PIM-SM,可以为用户主机提供指定组播源服务,加入同一组播组的用户主机可以按各自需要只接收指定源的组播数据。

4.6 调整组播源控制参数通过过滤组播源地址,以及对组播源生存时间进行控制,可以提高数据安全性、控制网络流量。

4.7 调整邻居控制参数PIM设备之间通过交互Hello报文建立邻居关系。

4.8 调整DR竞选控制参数设备之间通过交互Hello报文选举DR,主要负责源端或者组成员端的协议报文发送的工作。

4.9 调整加入和剪枝控制参数设备向上游发送Join信息请求转发组播数据,发送Prune信息请求停止转发组播数据。

可以根据实际需要调整转发控制参数,若无特殊需要,推荐使用缺省值。

4.10 调整断言控制参数当设备从下游接口接收到组播数据时,说明该网段中还存在其他的上游设备。

设备从该接口发出Assert报文,参与竞选唯一上游。

4.11 配置PIM BFD当BFD检测到对端故障以后上报PIM模块,PIM模块立即触发新一轮的DR竞选过程,而不是等到邻居关系超时,这将很大程度上缩小组播数据传输的中断时间,提高组播网络的可靠性。

PIMSM协议稳定多播传输的关键协议

PIMSM协议稳定多播传输的关键协议

PIMSM协议稳定多播传输的关键协议在计算机网络中,多播传输是一种将数据同时发送给多个接收者的通信方式。

然而,多播传输面临着诸多挑战,例如网络拓扑的复杂性、带宽利用率的问题以及数据可靠性的保证。

为了解决这些问题,PIM-SM(Protocol Independent Multicast-Sparse Mode)协议应运而生,成为了稳定多播传输的关键协议之一。

PIM-SM协议采用了一种分布式的多播传输路由选择机制,称为源特定树(Source Specific Tree)。

其核心思想是,对于每个多播组,只有一棵树负责从源节点向所有接收者传输数据。

这种树的构建通过源节点发送特殊的数据包来完成,数据包经过网络中的路由器,根据PIM-SM协议规定的转发逻辑来建立具体的传输路径。

这种树的构建方式灵活且高效,能够适应网络拓扑的变化,并降低了传输路径上的冗余。

另外,PIM-SM协议还引入了Rendezvous Point(RP)的概念,用于协调多播组源节点和接收者之间的数据传输。

RP相当于多播组的管理员,它的任务是确定合适的路径,将源节点的数据传输给接收者。

RP的选择可以基于静态配置,也可以通过自动选择算法来确定。

无论是静态配置还是自动选择,RP的选取都需要保证网络性能和传输效率。

在PIM-SM协议中,数据的可靠性主要依靠网络层的转发机制。

当接收者加入一个多播组时,它将发送Join请求给到RP,并加入特定的源树。

源节点根据接收者的Join请求,将数据传输到RP,然后RP再将数据发送给接收者。

这种机制保证了数据从源节点到接收者的可靠传输,同时也减少了网络中的冗余传输。

PIM-SM协议不仅仅只支持单播网络,也可以支持多种类型的网络,例如广播网络、点对点网络以及混合网络。

它的灵活性使得它成为了广泛应用于Internet和互联网服务提供商(ISP)等基础设施中的多播传输协议。

总结起来,PIM-SM协议是一种分布式的稳定多播传输协议,通过源特定树的构建机制和Rendezvous Point的协调选择策略,保障了多播数据的可靠传输。

PIM技术介绍-2017.04.18

PIM技术介绍-2017.04.18

PIM技术介绍目录1 PIM简介 (2)1.1 PIM-DM 简介 (2)1.2 PIM-DM 工作机制 (2)1.2.1邻居发现 (2)1.2.2构建SPT (3)1.2.3嫁接 (3)1.2.4断言 (4)1.3 PIM-SM 简介 (4)1.4 PIM-SM 工作机制 (5)1.4.1邻居发现 (5)1.4.2DR 选举 (5)1.4.3RP发现 (6)1.4.4构建RPT (8)1.4.5组播源注册 (8)1.4.6RPT 向SPT 切换 (9)1.4.7断言 (9)1.5 SSM 模型在PIM 中的实现 (10)1.5.1邻邻居发现 (10)1.5.2DR 选举 (10)1.5.3构建SPT (10)2 PIM协议报文格式 (12)2.1 PIM报文通用格式 (12)2.2 PIM Hello消息格式 (13)2.3 PIM Register消息格式 (15)2.4 PIM Register-Stop消息格式 (17)2.5 PIM Join/Prune消息格式 (18)2.6 PIM Graft/Graft-Ack消息格式 (21)2.7 PIM Bootstrap消息格式 (23)2.8 PIM Assert消息格式 (26)2.9 PIM C-RP Advertisement消息格式 (27)3 组播相关概念 (30)3.1 IP组播三种的传递方式 (30)3.2 IP组播技术体系结构 (30)1 PIM简介PIM 是Protocol Independent Multicast(协议无关组播)的简称,表示可以利用静态路由或者任意单播路由协议(包括RIP、OSPF、IS-IS、BGP 等)所生成的单播路由表为IP 组播提供路由。

组播路由与所采用的单播路由协议无关,只要能够通过单播路由协议产生相应的组播路由表项即可。

PIM 借助RPF(Reverse PathForwarding,逆向路径转发)机制实现对组播报文的转发。

PIM-SM协议原

PIM-SM协议原
26
第3章 PIM-SM协议机制
第1节 邻居发现 第2节 DR选举 第3节 RP发现 第4节 RPT共享树加入 第5节 组播源注册 第6节 SPT切换
27
SPT切换
RPT向SPT切换
组播源 (S,G)
数据流 共享树
源树 (S, G) 加入
RP
接收者
最后一跳路由器加入源树 (S, G) 状态被沿着源树新 分支创建
28
SPT切换
切换后的组播转发
组播源 (S,G)
数据流 共享树
源树 (S, G)RP位剪枝
RP
接收者
组播数据流沿源树转发 (S, G) RP位剪枝减掉了共 享树上的数据流
29
SPT切换
切换后的剪枝
组播源 (S,G)
数据流 共享树
源树 (S, G)RP位剪枝
RP
RP不再需要(S, G) 数据流 ,所以剪枝掉 (S, G) 数据。
接收者
22
第3章 PIM-SM协议机制
第1节 邻居发现 第2节 DR选举 第3节 RP发现 第4节 RPT共享树加入 第5节 组播源注册 第6节 SPT切换
23
组播源注册
注册过程
组播源
DR
数据流 共享树
源树 (S, G) 注册 (S, G) 加入
RP
(S, G) 仅在源树沿途建立
(单播)
接收者
24
接收者
30

SPT切换
切换后的剪枝
组播源 (S,G)
数据流 共享树
源树
RP
(S, G) 数据流现在从源树的 一个分支流向接收者。
接收者
31
SPT切换
SPT切换条件

PIM-SM技术白皮书

PIM-SM技术白皮书

锐捷PIM-SM技术白皮书摘要该文档主要描述PIMSM/协议的基本原理、BSR协议的基本原理、我司的技术特点。

关键词多播树的生成与裁剪、BSR机制及RP发现、多播报文转发规则、PIM-SSM简介、锐捷PIMSM技术特点。

技术白皮书修订记录目录摘要 (1)关键词 (1)1 缩略语 (3)2 概述 (4)3 技术介绍 (5)3.1 多播树的生成与裁剪 (5)3.1.1 第一阶段:RP树 (5)3.1.2 第二阶段:Register Stop (7)3.1.3 第三阶段:最短路径树(SPT) (8)3.1.4 多协议协同工作:(*,*,RP)路由项 (9)3.2 BSR机制及RP发现 (9)3.3 多播报文转发规则 (10)3.4 PIM-SSM简介 (10)4 锐捷PIMSM技术特点 (10)5 结束语 (12)1 缩略语上游接口,下游接口,反向路径转发检查,源树,共享树,(S,G),(*,G),(*,*,RP),(S,G,rpt),多播路由表,多播转发表,BSR,RP。

●上游接口(Upstream Interface)对一个指定的源站点S或集会点RP,接收到该源站点或集会点RP所发的数据包且检查正确的接口称为上游接口;●下游接口(Downstream Interface)对一个指定的源站点S或集会点RP,所有不是上游接口的接口被称为下游接口;●反向路径转发检查(Reverse Path Forwarding Check:RPF Check)当接收到一个多播包时,路由器将进行RPF检查。

路由器在单播路由表中查找源或集会点的地址,确定多播包是否在到源或集会点的反向路径的接口上被收到。

如果是,RPF检查成功,多播包将被转发。

否则RPF检查失败,多播包将被丢弃。

●源树(Source T rees)多播分发的最简单方式,它是以多播源为根,向接收者生长的树,因为这种树使用了网络中的最短路径,所以也被称为最短路径树(SPT)。

PIM介绍——精选推荐

PIM介绍——精选推荐

1.1 PIM-DM协议简介协议独立组播-密集模式PIM-DM(Protocol Independent Multicast,Dense Mode)属于密集模式的组播路由协议。

PIM-DM适用于小型网络,在这种网络环境下,组播组的成员相对比较密集。

PIM-DM的工作过程可以概括为:邻居发现、扩散—剪枝过程、嫁接阶段。

1. 邻居发现PIM-DM路由器刚开始启动时,需要使用Hello报文来进行邻居发现。

各个运行PIM-DM的网络节点之间使用Hello报文保持相互之间的联系。

PIM-DM的Hello报文是周期性发送的。

2. 扩散—剪枝过程(Flooding&Prune)PIM-DM假设网络上的所有主机都准备接收组播数据。

当某组播源S开始向组播组G发送数据时,路由器接收到组播报文后,首先根据单播路由表进行RPF检查,如果检查通过,路由器创建一个(S,G)表项,然后将数据向网络上所有下游PIM-DM节点转发(Flooding)。

如果没有通过RPF检查,即组播报文从错误的接口输入,则将报文丢弃。

经过这个过程,在PIM-DM组播域内,都会创建一个(S,G)表项。

如果下游节点没有组播组成员,则向上游节点发剪枝(Prune)消息,通知上游节点不用再向下游节点转发数据。

上游节点收到剪枝消息后,就将相应的接口从其组播转发表项(S,G)对应的输出接口列表中删除,这样就建立了一个以源S为根的SPT(Shortest Path Tree)树。

剪枝过程最先由叶子路由器发起。

这个过程就称为扩散—剪枝过程。

各个被剪枝的节点同时提供了超时机制,当剪枝超时时,每台路由器又重新开始扩散—剪枝过程。

PIM-DM的扩散—剪枝机制周期性地不断进行。

在这个过程中,PIM-DM采用RPF检查,利用现存的单播路由表构建了一棵从数据源始发的组播转发树。

当一个组播包到达的时候,路由器首先判断到达路径的正确性。

如果到达接口是单播路由指示的通往组播源的接口,那么认为这个组播包是从正确路径而来;否则,这个组播包将作为冗余报文而被丢弃,不进行组播转发。

基于IPv6的PIM-SM协议研究与实现

基于IPv6的PIM-SM协议研究与实现

p r o t o c o l PI M - S M ( P r o t o c o l I n d e p e n d e n c e M ul t i c as t — S p a r s e M o d e) i n d e t a i 1 a n d p r e s e n t s t h e i m p l e m e n t a t i o n
由于组播 技术 的优越性 ,I E T F在制定 I P v 6协议时, 保 留了 组播 , 而 取消 了广播 。I P v 6技 术对 组播作 了进一 步加 强。I P v 6 技 术克服 了 I P v 4 I P地址 匮乏, 网络 安全性能较差 , 网络带 宽受 限, 服务 质量无保 障, 支持移动性 弱等缺陷 。I P v 6组播技术 可 以 有效利用 带宽 , 避 免重复发送 造成 的网络资源浪 费, 可 以提 高数 据 传送 效率 , 还可 以避 免单播 和广播 中可 能 出现 的广播 风暴 问
题。
共享 网络上 , 各路 由器 互相 发送 H E L L 如果优 先级相 同, 则I P地址最 大的一个 成
为D R 。 当D R故障时, 会触发新 的 D R选举过程 。
1 . 3 R P发 现
R P是P I M - S M 域 中的核 心设 备,P I M - S M域 内的所 有路 由 器 /交换 机都 必须 知道 R P的地址 。 在 结构简 单 的小型 网路 中, 组播 信息量 少, 整个 网络依 靠一个 R P进 行数 据 的转发 即可, 可 以通 过人 工配置 的方式配 置静 态 R P 。 对 于规模 较大 的 网络, 通 过R P 转 发 的组播 数据信 息量 巨大或 者 R P经 常变 化, 为 了缓解

pim路由协议的基本原理

pim路由协议的基本原理

pim路由协议的基本原理PIM路由协议的基本原理是协议无关组播路由协议,它不依赖于单播路由协议,而是通过RPF(Reverse Path Forwarding)机制根据接收者的分布数量和网络环境生成组播路由表,转发组播报文。

PIM协议分为两种模式:Dense Mode(DM)和Sparse Mode(SM)。

DM适用于组播组成员数量相对较多、分布相对密集的情况,采用“推(Push)”的方式转发组播报文及生成组播表。

而SM则适用于接收者分布较为分散、地域较大的环境,采用“拉(PULL)”模型建组播表,组播流仅流向有接收者的位置。

在PIM SM模式中,路由器分为以下几种:1.RP(Rendezvous Point):负责接收组播数据,并向组播接受者进行转发,同时与组播源构建SPT(Shortest Path Tree)树,与组播接受者构建RPT(Reverse Path Tree)树。

2.叶子路由器:与用户主机相连的PIM路由器,但连接的用户主机不一定为组成员。

3.第一跳路由器:组播转发路径上,与组播源相连且负责转发该组播源发出的组播数据的PIM路由器。

4.最后一跳路由器:组播转发路径上,与组播组成员相连且负责向该组成员转发组播数据的PIM路由器。

5.中间路由器:组播转发路径上,第一跳路由器与最后一跳路由器之间的PIM路由器。

在PIM SM模式下,当网络中出现组成员时,用户通过IGMP加入某组播组,然后由最后一跳路由器向RP发送join报文,并逐跳在PIM路由器上建立(* G)表项。

RP每隔60秒向上游PIM路由器发送join报文,收到join报文后,重置接口计时器(210秒),超时后就会将此接口从下游接口中移除。

只要接受者存在,成员端DR就会每隔60秒向上游PIM路由器发送join报文,用来刷新(* G)条目。

IGMP原理简介

IGMP原理简介

IGMP原理简介IGMP 协议是IP 组播在末端网络上使用的主机对路由器的信令机制,分为两个功能部分:主机侧和路由器侧。

IGMP 工作机制如下所述:1. 接收者主机向所在的共享网络报告组成员关系。

2. 处于同一网段的所有使能了IGMP 功能的组播路由器选举出一台作为查询器,查询器周期性地向该共享网段发送组成员查询消息。

3. 接收者主机接收到该查询消息后进行响应以报告组成员关系。

4. 网段中的组播路由器依据接收到的响应来刷新组成员的存在信息。

如果超时无响应,组播路由器就认为网段中没有该组播组的成员,从而取消相应的组播数据转发。

5. 所有参与组播传输的接收者主机必须应用IGMP 协议。

主机可以在任意时间、任意位置、成员总数不受限制地加入或退出组播组。

6. 支持组播的路由器不需要也不可能保存所有主机的成员关系,它只是通过IGMP协议了解每个接口连接的网段上是否存在某个组播组的接收者,即组成员。

而各主机只需要保存自己加入了哪些组播组。

IGMPv1工作机制IGMPv1 协议主要基于查询和响应机制完成组播组管理。

在多路由器共享网段上,由三层路由协议选举出唯一的组播信息转发者(Assert Winner 或DR),并作为IGMPv1 的查询器,负责该网段的组成员关系查询。

网络上IGMPv1 消息交互如图9-1 所示。

主机加入组播组的基本过程如下:1. IGMP 查询器(RouterB)周期性地向共享网段内所有主机以组播方式(目的地址为组播地址)发送普遍组Query 查询消息。

该报文的目的地址为224.0.0.1,表示该网段上的所有主机和路由器。

2. 网段内所有主机都接收到该普遍组查询消息。

如果主机(如HostB 和HostC)希望加入某组播组G1,则以组播方式发送Report 报告。

该报文的目的地址为224.0.0.1,报文中携带组播组G1 的地址信息。

3. 网段中所有主机和路由器都接收到该Report 报告,并获知组播组G1 地址信息,此时网段中其它也希望加入该组播组G1 的主机将不再发送针对相同组播组的Report 报告。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

C-RP1 GROUP1 GROUP2
GROUP3
/ 24
GROUP1 C-RP1 GROUP2 C- RP1 C-RP2 GROUP3 C-RP1 C-RP2
每个路由器上都有 相同的RP-set
GROUP4 C-RP2
/25
RP发现
数据流 共享树 源树 (S, G)RP位剪枝
RP不再需要(S, G) 数据流 ,所以剪枝掉 (S, G) 数据。
接收者
/37
SPT切换
切换后的剪枝
组播源 (S,G)
RP
数据流 共享树 源树 接收者
(S, G) 数据流现在从源树的 一个分支流向接收者。
/38
DR选举
DR的作用
借助Hello消息可以为共享网络(如Ethernet)选举DR(Designated Router) 无论是和组播源连接的网络,还是和接收者连接的网络,只要网
络为共享媒介则都需要选举DR
– 接收者侧DR向RP发送Join加入消息 – 组播源侧DR向RP发送Register注册消息
PIM-SM 协议原理
/
第1章 组播路由概述 第2章 PIM概述 第3章 PIM-SM协议机制
/ 2
组播转发模型
基于IP报文的源地址、 目的地址进行查找转发 表
R1组播转发表 S G IIF OIFList H1 G1 Eth1 Eth2、Eth3
/35
SPT切换
切换后的组播转发
组播源 (S,G)
RP
组播数据流沿源树转发 数据流 共享树 源树 (S, G)RP位剪枝 (S, G) RP位剪枝减掉了共 享树上的数据流 接收者
/36
SPT切换
切换后的剪枝
组播源 (S,G)
RP
/14
第3章 PIM-SM协议机制
第1节 邻居发现 第2节 DR选举 第3节 RP发现 第4节 RPT共享树加入 第5节 组播源注册 第6节 SPT切换
/15
邻居发现
Hello报文
刚启动的组播路由器需要使用Hello消息来发现邻居,并维护邻居关系 Hello报文格式:
/33
第3章 PIM-SM协议机制
第1节 邻居发现 第2节 DR选举 第3节 RP发现 第4节 RPT共享树加入 第5节 组播源注册 第6节 SPT切换
/34
SPT切换
RPT向SPT切换
组播源 (S,G)
RP
最后一跳路由器加入源树 数据流 共享树 源树 (S, G) 加入 (S, G) 状态被沿着源树新 分支创建 接收者
网络中的每个路由器仍然 会保留(S, G)表项
接收者
/12
第1章 组播路由概述 第2章 PIM概述 第3章 PIM-SM协议机制
/13
PIMv2报文头格式
0 7 15 31
版本
类型
保留
校验和
版本 – 版本字段标识版本信息,当前为2 类型 – 0:Hello – 1:注册(仅用于SM) – 2:注册停止(仅用于SM) – 3:加入/剪枝 – 4:Bootstrap(仅用于SM) – 5:Assert – 6:嫁接(仅用于DM) – 7:嫁接回应(仅用于DM) – 8:候选RP公告(仅用于SM)
/ 22
BSR选举使用的报文(bootstrap)
/23
RP发现
C-RP2 GROUP1 C-RP1 GROUP2 C- RP1 C-RP2 GROUP3 C-RP1 C-RP2 GROUP4 C-RP2 GROUP2 GROUP3 GROUP4
/20
RP发现
RP (Rendezvous Point)
在PIM-SM组播网络里,担当共享树的树根的节点被称为RP RP的作用 – 共享树里所有组播流都通过RP转发到接收者
如何发现RP
– 在DR和叶子路由器以及组播数据流将要经过的所有路由器上 手工指定RP的IP地址
– 启动BootStrap 协议,利用自举机制来动态选举RP
/21
RP发现
BSR 在PIM-SM网络启动后,负责收集网络内的RP信息,然后将RP集(即 组-RP的映射数据库)发布到整个PIM-SM网络的路由器,称之为BSR RP (汇聚点) • 共享树里所有组播流都通过RP转发到接收者 C-RP(候选RP 需配置) C-BSR (候选BSR 需配置) 通过候选BSR选出BSR
用来检查是否应该接收从某个接口来的某个源组的组播数据报文 该接口由组播路由协议生成,也被组播路由协议用来构建分发树。
组播源S
Eth 0
组播转发表
S S
G G
IIF OIFList Eth0 ……
Eth 1
接收者R2 单播路由表 目的 下一跳 接口 S 接收者R1 ... Eth0 Eth 0 Eth 1
/28
RPT共享树加入
加入共享树
RP
IGMP报告 (*, G) 加入 共享树 接收者
(*, G) 仅在共享树沿途建立
/29
第3章 PIM-SM协议机制
第1节 邻居发现 第2节 DR选举 第3节 RP发现 第4节 RPT共享树加入 第5节 组播源注册 第6节 SPT切换
(单播) (单播)
接收者
数据流从组播源通过源树到 达RP RP向第一跳路由器发送注册 停止(Register-Stop)消息 ,停止注册过程
/32
组播源注册
组播流转发过程
组播源
RP
数据流 共享树 源树 接收者
源数据流延源树(SPT)流 向RP 从RP开始,数据流延共享 树(RPT)流向接收者
SPT切换
SPT切换条件
当信息吞吐率超过预定的值时,PIM-SM就 会从共享树切换到组播源路径树。
/39
/
/ 9
构建SPT树
扩散
组播源
组播报文
网络中的每个路由器都会 创建(S, G)表项
接收者
/10
构建SPT树
剪枝
组播源
组播报文 剪枝消息
接收者
/ 11
构建SPT树
SPT树形成
组播源
组播报文 扩散-剪枝周期性进行! 每3分钟重复一次。
– Hash算法参数:
• 组地址; • 掩码长度; • C-RP地址。
如果域中存在多个C-RP并都拥有相同的优先级与Hash数值时,则拥有 最高IP地址的C-RP为该域的RP。
/26
/27
第3章 PIM-SM协议机制
第1节 邻居发现 第2节 DR选举 第3节 RP发现 第4节 RPT共享树加入 第5节 组播源注册 第6节 SPT切换
R3组播转发表 S G IIF OIFList H1 G1 Eth1 Eth2
R3 Eth1
Eth3
Eth2
R1 H1
发送到Group1 的报文
H3
加入Group1
Eth1 Eth2
加入Group1
R2
Page 3
/
H2
反向路径转发RPF (Reverse Path Forwarding)
PIM概述
概述
PIM-DM(Protocol Independent Multicast Dense Mode)称为协议 独立组播-密集模式,属于密集模式的组播路由协议,主要用 于组成员分布相对密集的网络。 协议假设:当组播源开始发送组播数据时,域内所有的网络节 点都需要接收数据。 PIM-SM(Protocol Independent Multicast Sparse Mode)称为协议 独立组播-稀疏模式,属于稀疏模式的组播路由协议,主要用 于组成员分布相对分散、范围较广、大规模的网络。 协议假设:当组播源开始发送组播数据时,域内所有的网络节 点都不需要接收数据。
/30
组播源注册
注册过程
组播源
DR
RP
数据流 共享树 源树 (S, G) 注册 (S, G) 加入
(S, G) 仅在源树沿途建立
(单播)
接收者
/31
组播源注册
停止注册过程
组播源
RP
数据流 共享树 源树 (S, G)注册 (S, G) 注册停止
RP的选举
如果PIM-SM域中只有一个候选RP( Candidate-RP,C-RP),那么这个 节点就是域里的RP。 如果域中存在多个C-RP并都拥有不同的优先级时,则优先级最高(优 先级数值越小优先级越高)的将会被选举为域中的RP。 如果域中存在多个C-RP并都拥有相同的优先级时,则依靠Hash算法算 出的数值来决定RP,数值最大的成为RP。
IP组播提供路由的单播路由协议可以是静态路由、RIP、OSPF、ISIS、BGP等,组播路由和单播路由协议无关,只要单播路由协议能 产生路由表项即可。 PIM协议分为: – PIM-DM(协议无关组播-密集模式) – PIM-SM(协议无关组播-稀疏模式)
/ 8
/18
DR选举
DR选举
Ethernet DR
Ethernet
R
RP
Receiver
SourceDRR NhomakorabeaHello Register Join
R
R
R R
R
Receiver
19 /
第3章 PIM-SM协议机制
第1节 邻居发现 第2节 DR选举 第3节 RP发现 第4节 RPT共享树加入 第5节 组播源注册 第6节 SPT切换
F
C
E
(RP)
PIM汇聚点
共享树 源树
接收者 R1
接收者 R2
/
第1章 组播路由概述 第2章 PIM概述 第3章 PIM-SM协议机制
相关文档
最新文档