1. 程式人生 > >IP multicast IP多播

IP multicast IP多播

https://networklessons.com/multicast/multicast-routing/

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.