博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IP multicast IP多播
阅读量:6552 次
发布时间:2019-06-24

本文共 2392 字,大约阅读时间需要 7 分钟。

IP多播有两种模式,密集模式和稀疏模式:

  • Dense Mode
  • Sparse Mode

密集模式下,每个路由器收到多播包之后,发往除接收接口之外的所有其它接口,类似,洪泛。

稀疏模式,待补充。。。

 

密集模式下,很容易产生路由环路,通过采用返向路径转发RPF (Reverse Path Forwarding),来实现路由环路的避免,流程如下:

Above we have R1 which receives a multicast packet which is flooded on all interfaces except the interface that connects to the video server. I’m only showing the packet that is flooded towards R3 here:

  • R1 floods the packet to R3.
  • R3 floods the packet to R2.
  • R2 floods it back to R1.

We now have a multicast routing loop. We can prevent this by implementing the RPF check:

When a router receives a multicast packet on an interface, it looks at the source IP address and does two checks:

  • Do we have an entry that matches the source address in the unicast routing table?
  • If so, what interface do we use to reach that source address?

When the multicast packet is received on the interface that matches the information from the unicast routing table, it passes the RPF check and we accept the packet. When it fails the RPF check, we drop the packet.

 

Multicast Forwarding

In unicast routing, traffic is routed through the network along a single path from the source to the destination host. A unicast router does not consider the source address; it considers only the destination address and how to forward the traffic toward that destination. The router scans through its routing table for the destination address and then forwards a single copy of the unicast packet out the correct interface in the direction of the destination.

In multicast forwarding, the source is sending traffic to an arbitrary group of hosts that are represented by a multicast group address. The multicast router must determine which direction is the upstream direction (toward the source) and which one is the downstream direction (or directions). If there are multiple downstream paths, the router replicates the packet and forwards it down the appropriate downstream paths (best unicast route metric)—which is not necessarily all paths. Forwarding multicast traffic away from the source, rather than to the receiver, is called Reverse Path Forwarding (RPF). RPF is described in the following section.

 

一个路由器能够同时接收单播和多播,那么,需要根据目的地址是什么类型的地址采取不同的处理:

1、如果是单播地址,查询单播路由表,转发;

2、如果是多播地址,

  (1)进行RPF检查,根据接收到的源地址,查询单播路由表,找到输出接口,判断输出接口是否与接收的接口一致,若一致,通过RPF检查,若不一致,丢弃;

  (2)查询多播路由表,转发,若有多个输出转发接口,复制多份,分别发往各个接口。

 

转载于:https://www.cnblogs.com/yanhc/p/9993495.html

你可能感兴趣的文章
备战未来,6 款优秀的 AR/VR 开源库推荐
查看>>
Unity 接入Android SDK-小米sdk
查看>>
SpringMVC源码总结(一)HandlerMapping和HandlerAdapter入门
查看>>
高性能服务器架构思路(一)——缓冲策略
查看>>
Maven使用大全
查看>>
linux 下添加一个不能登录的用户
查看>>
四周第三次课(2月28日)
查看>>
除了游戏和医疗,腾讯区块链还准备做什么?
查看>>
彻底认识 PendingIntent
查看>>
深入理解 new 操作符
查看>>
go实现区块链[1]-block
查看>>
00后都开始养生了!你还在熬最晚的夜?
查看>>
被嘲笑PPT做的辣眼睛?4个顶级辅助工具帮你完美逆袭!
查看>>
hanlp 如何快速从分词仅取出人名
查看>>
Nacos Committers 团队首亮相,发布 0.9.0 版本
查看>>
软件中心哪家强?
查看>>
使用Linux的15大理由
查看>>
ONOS 项目与 Linux 基金会合作开发 SDN/NFV
查看>>
Django高亮Markdown代码
查看>>
第一周
查看>>