TCPIP协议原理Chapter14IP组播.ppt

上传人:小飞机 文档编号:5576288 上传时间:2023-07-29 格式:PPT 页数:61 大小:1.03MB
返回 下载 相关 举报
TCPIP协议原理Chapter14IP组播.ppt_第1页
第1页 / 共61页
TCPIP协议原理Chapter14IP组播.ppt_第2页
第2页 / 共61页
TCPIP协议原理Chapter14IP组播.ppt_第3页
第3页 / 共61页
TCPIP协议原理Chapter14IP组播.ppt_第4页
第4页 / 共61页
TCPIP协议原理Chapter14IP组播.ppt_第5页
第5页 / 共61页
点击查看更多>>
资源描述

《TCPIP协议原理Chapter14IP组播.ppt》由会员分享,可在线阅读,更多相关《TCPIP协议原理Chapter14IP组播.ppt(61页珍藏版)》请在三一办公上搜索。

1、第14章 IP组播,计算机科学学院 梁晓Email:,单播、广播与组播,单播,组播,广播,实现点对多点通信的两种途径(1),多个单播:发送者对每个接收者都采用一条单播传输;,共有 90 个主机接收视频节目,R1,R3,R4,R2,视频服务器 M,实现点对多点通信的两种途径(2),组播发送主机仅发送一个包;一旦该包需要转发,路由器才进行复制;,组播组成员共有 90 个,R1,R3,R4,R2,视频服务器 M,发送 1 次组播,复制,IP Multicast How Does it Work?,The sender(source)sends one copy of a single packet

2、addressed to a group of receivers-multicast groupMulticast routers replicate and forward the packet to all the branches where receivers(may)existReceivers express(表达了)their interest in multicast traffic by sending control messages to routers,Why Multicast?,more and more multimedia communication appl

3、ication and service have emerged in Internet that all the recipients want the same type of dataEx.Digital TV,Digital Radio,Video ConferenceConsume much more bandwidth than usual applicationRequire high QoS supportBelong to one-to-many communication style,Enhanced EfficiencyOptimized PerformanceDistr

4、ibuted Applications,Multicast Advantages,组播应用,一对多定时的媒体播放,“推送”服务(股票价格,天气预报);多对多网络游戏,视频会议有反馈的多对一资源发现,数据收集,IP Multicast Applications,组播通信的几个问题,如何标识组播通信的接收方?如何确定和维护组成员关系?如何为发送给这些接收者的数据报寻址?,IP组播编址机制,组成员关系协议,组播路由协议,组播体系结构,组播组和组播地址,IP组播地址由D类IP地址标记。地址的最高四位为“1110”;范围。D类IP地址又进行了划分。,组播组和组播地址,从至的地址被IANA保留为网络协议使

5、用,作为永久组的地址,其中比较重要的地址有:224.0.0.1 网段上所有支持组播的主机224.0.0.2 网段上所有支持组播的路由器224.0.0.4 所有DVMRP路由器224.0.0.5 所有OSPF路由器224.0.0.6 指定的OSPF路由器224.0.0.9 所有RIP2路由器224.0.0.10 所有IGRP路由器224.0.0.13 所有PIM路由器,D类IP地址与以太网多播地址的映射关系,00000000,00000001,01011110,0,1110,0,8,16,24,31,D 类 IP 地址,这 5 位不使用,48 位以太网地址,0 1 0 0 5 E,表示多播,最低

6、 23 位来自 D 类 IP 地址,组播协议,组成员关系协议主机-路由器之间;主要有IGMP,它负责建立并维护路由器直联网段的组成员关系信息。组播路由协议路由器-路由器之间;根据IGMP维护的这些组播组成员关系信息,运用一定的组播路由算法构造组播分布树进行组播分组转发,主要包括DVMRP、MOSPF、CBT、PIM-DM、PIM-SM等。,Internet组管理协议(IGMP),目前已使用的有3个版本:IGMPv1,v2和v3。它用于将局域网内主机的组成员关系报告给本网段内的组播路由器。,Internet组管理协议(IGMP),IGMP只工作在本地范围。,组播组,IGMP,IGMP,IGMP,

7、IGMP,R1,R4,R3,R2,Internet组管理协议(IGMP),IGMP工作的两个阶段(1),当某个主机加入新的组播组时,该主机应向组播组的组播路由器发送IGMP 报文,声明自己要成为该组的成员。本地的组播路由器收到 IGMP 报文后,将组成员关系转发给因特网上的其他组播路由器。,IGMP工作的两个阶段(2),因为组成员关系是动态的,因此本地组播路由器要周期性地探询本网上的主机,以便知道这些主机是否还继续是组成员。只要对某个组有一个主机响应,那么组播路由器就认为这个组是活跃的。但一个组在经过几次的探询后仍然没有一个主机响应,则不再将该组的成员关系转发给其他的组播路由器。,IGMP报文

8、格式与类型,报文格式,报文类型:查询,成员报告,退出报告。,IGMP报文的封装,IGMP报文封装在IP数据报中发送。IP报头:协议字段值=2TTL=1(因为IGMP只在本地工作)目的IP地址:,Joining member sends report to 224.1.1.1 immediately upon joining(same as IGMPv1),H1,H3,rtr-a,IGMPv2Joining a Group,Router sends periodic queriesOne member per group per subnet reportsOther members suppr

9、ess reports,IGMPv2,IGMPv2Maintaining a Group,IGMPv2,H1,H2,H3,Initially,all routers send out a query,Router with the lowest IP address is elected querier,IGMPQuerier,Other routers become non-queriers,IGMPNon-Querier,rtr-a,rtr-b,IGMPv2Querier Election,H2 leaves group;sends Leave message,Router sends G

10、roup-Specific Query,A remaining member host sends report,Group remains active,H1,rtr-a,H3,H2,IGMPv2Leaving a Group,Last host leaves group;sends Leave message,Router sends Group-Specific Query,No report is received,Group times out,rtr-a,H1,H3,IGMPv2Leaving a Group,组播与单播在选路的不同,组播转发必须动态地适应组播组成员的变化(这时网络

11、拓扑并未发生变化)。请注意,单播路由选择通常是在网络拓扑发生变化时才需要更新路由。组播数据报可以由没有加入组播组的主机发出,也可以通过没有组成员接入的网络。组播路由器在转发组播数据报时,不能仅仅根据组播数据报中的目的地址。,在转发时,组播路由器使用数据报的源地址和目的地址,Multicast Forwarding,Multicast routing works the opposite way of unicast routingUnicast routing is concerned with where the packet is goingMulticast routing is con

12、cerned with where the packet comes fromMulticast routing uses Reverse Path Forwarding(反向路径转发)to prevent forwarding loops,Reverse Path Forwarding(RPF),What is RPF?A router forwards a multicast datagram only if received on the upstream interface to the source,i.e.it follows the distribution treeThe RP

13、F CheckThe routing table for unicast is checked against the source address in the multicast datagramIf the datagram arrived on the interface specified in the routing table for the source address:The RPF check succeedsOtherwise,the RPF check fails,Reverse Path Forwarding(cont.),Reverse Path Forwardin

14、g(RPF)check:If the RPF check succeeds,the datagram is forwardedIf the RPF check fails,the datagram is typically silently discardedWhen a datagram is forwarded,it is sent out of each interface in the outgoing interface listThe packet is never sent back out of the RPF interface,RPF Checking,Multicast

15、Distribution Tree,Example:RPF Checking,Multicast Packets,RPF Checks fail Packets arrived on wrong interface.,RPF Check Succeeds,RPF Check Succeeds!,Unicast Route TableNetwork Interface151.10.0.0/16S1198.14.32.0/24S0204.1.16.0/24E0,E0,S1,S0,S2,S1,Forward out of all outgoing interfaces.(i.e.down the d

16、istribution tree),RPF Check(cont.),RPF Check Fails!,RPF Check Fails,E0,S1,S0,S2,Unicast Route TableNetwork Interface151.10.0.0/16S1198.14.32.0/24S0204.1.16.0/24E0,S1,RPF Check,RPF Interface,Reverse Path Forwarding(RPF)check is done with respect(关于)to the RPF interfaceThe interface that is closest to

17、 the source Determined from any unicast or dedicated(专用)multicast table(DVMRP,MBGP)Periodic(周期性)recheck of the RPF interface,组播路由协议,组播路由协议负责构建组播分组的传输路径。组播分布树(Distribution Tree)在传输组播分组时,指派路由器构造一个连接所有组播组成员的树。根据这个树,路由器得出转发分组的一条唯一路径。由于组播组成员可以动态地加入和退出,因此组播分布树也必须动态更新。,组播路由协议,根据构造方法的不同,有两种最基本的组播分布树:源分布树和共享

18、分布树。源分布树(Source Distribution Tree)以组播源为根节点构造到所有组播组成员路径都最短的生成树。也称为最短路径树(Shortest Path Tree,SPT)。,Shortest-Path or Source Distribution Tree,Receiver 1,B,E,A,D,F,Source 1,Notation:(S,G)S=Source G=Group,C,Receiver 2,Source 2,Shortest-Path Trees,Shortest-Path or Source Distribution Tree,Receiver 1,B,E,A,

19、D,F,Source 1,Notation:(S,G)S=Source G=Group,C,Receiver 2,Source 2,The Tree is per SOURCE,Shortest-Path Trees,Shortest-Path Trees,在每一个组播组内,每个源节点建立一棵到所有其它成员的最短路径树,即源节点和组的每一种组合构成一棵树。每一个路由器必须有关于每一个特定树的信息,路由器根据组播分组的源地址及组地址确定使用哪棵多播树转发。优点:多播分组总是使用最佳路径转发。缺点:路由器需要维护大量的多播树。,Shared Distribution Tree,共享分布树(Shar

20、ed Distribution Tree)以网络中的某一个指定的路由器为根节点,该路由器称为汇聚点(Rendezvous Point,RP)或核心,由此节点生成包含所有组成员的组播树。也称为RP树(RPT)或基于核心的树(Core-Based Tree,CBT)。,Shared Distribution Tree,Receiver 1,B,E,A,D,F,Notation:(*,G)*=All Sources G=Group,C,Receiver 2,(RP),(RP)PIM Rendezvous Point,Shared Distribution Tree,Shared Distributi

21、on Tree,Receiver 1,B,E,A,D,F,Notation:(*,G)*=All Sources G=Group,C,Receiver 2,(RP),(RP)PIM Rendezvous Point,Shared Distribution Tree,Shared Distribution Tree,每个组播组使用一棵以核心路由器为根的组播树。优点:路由器对于每个组只要维护一棵组播树,内存消耗减少。缺点:组播分组使用的转发路径可能不是最佳的,这是组共享树为实现可扩展性而付出的性能代价。,组播路由协议,组播路由协议的主要任务就是构造组播的分布树,使组播分组能够传送到相应的组播组成员

22、。根据对网络中的组播成员的分布和使用的不同,组播路由协议分为两类:密集模式路由协议(DM)稀疏模式路由协议(SM)。,DM路由协议,DM路由协议通常用于组播组成员(接收者)密集地分布且有足够带宽的网络环境。DM路由协议采用一种定期广播组播组的扩散-剪枝技术来维护组播分布树,它只使用源分布树(SPT)。DM路由协议有:DVMRP(Distance Vector Multicast Routing Protocol,距离向量组播路由协议)MOSPF(Multicast Open Shortest Path First,组播OSPF协议)PIM-DM(Protocol Independent Mul

23、ticast-Dense Mode,协议无关组播协议-密集模式),PIM-Dense Mode(PIM-DM),Protocol independent supports all underlying(已有)unicast routing protocols:static,RIP,IGRP,EIGRP,IS-IS,OSPF,and BGPUses flood and prune mechanismFloods network and prunes back based on multicast group membershipAssert mechanism used to prune off

24、 redundant flows on multiaccess networksAppropriate for smaller implementations and pilot networks(适用于小规模实验型网络),Initial Flooding,Source,Receiver,(S,G)state created inevery router in the network!,PIM-DM Flood and Prune,Pruning Unwanted Traffic,Source,Receiver,PIM-DM Flood and Prune(cont.),Source,Resu

25、lts after Pruning,Receiver,Flood and Prune processrepeats every three minutes!,(S,G)state still exists inevery router in the network!,PIM-DM Flood and Prune(cont.),SM路由协议,在网络中稀疏分布组播组成员、网络也没有充足带宽的情况(如广域网环境)下可以使用SM路由协议。SM路由协议采用选择性的建立和维护分布树的方式,由空树开始,仅当成员显式的请求加入分布树才做出修改。SM路由协议有:CBT:基于核心的分布树协议PIM-SM(Prot

26、ocol Independent Multicast-Sparse Mode,协议无关组播协议-稀疏模式),Receiver,RP,(*,G)State created onlyalong the Shared Tree.,PIM-SM Shared Tree Join,Receiver,RP,Shared Tree,(S,G)State created onlyalong the Source Tree.,PIM-SM Sender Registration,Receiver,RP,Shared Tree,RP sends a Register-Stop back to the first-

27、hop router to stop the Register process.,(S,G)traffic begins arriving at the RP via the Source tree.,PIM-SM Sender Registration(cont.),Receiver,RP,Shared Tree,Source traffic flows nativelyalong SPT to RP.,From RP,traffic flows downthe Shared Tree to Receivers.,PIM-SM Sender Registration(cont.),Recei

28、ver,RP,Shared Tree,Last-hop router joins the Source Tree.,Additional(S,G)State is created along new part of the Source Tree.,PIM-SM SPT Switchover,Receiver,RP,Shared Tree,Traffic begins flowing down the new branch of the Source Tree.,Additional(S,G)State is created along along the Shared Tree to pru

29、ne off(S,G)traffic.,PIM-SM SPT Switchover,Receiver,RP,Shared Tree,(S,G)Traffic flow is now pruned off of the Shared Tree and is flowing to the Receiver via the Source Tree.,PIM-SM SPT Switchover(cont.),Receiver,RP,Shared Tree,(S,G)traffic flow is no longer needed by the RP,so it Prunes the flow of(S

30、,G)traffic.,PIM-SM SPT Switchover(cont.),Receiver,RP,Shared Tree,(S,G)Traffic flow is now only flowing to the Receiver via a single branch of the Source Tree.,PIM-SM SPT Switchover(cont.),习题,组播路由器的表中有4个组(W、X、Y和Z),局域网上有3台主机。主机A有3个属于组W的成员,有一个属于组X的成员。主机B有2个属于组W的成员,有1个属于组Y的成员。主机C没有属于任何组的进程。试给出处于监视状态的IGMP报文。,组播路由协议,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号