PIM-DM protocol kernel trigger mechanism and Protocol operation mechanism record

Source: Internet
Author: User

PIM-DM and PIM-SM are two different modes in multicast routing ASM (any source multicast. Compared with the multicast registration mechanism of PIM-SM, the diffusion mechanism of PIM-DM is more rough.


1. The PIM-DM does not need to register the pimreg virtual interface with the kernel. But like the PIM-SM, you need to add the layer-3 interface to the MRT multicast interface. To trigger the cache_miss message after the kernel receives the group message.


2. In the protocol initialization phase, the PIM and IGMP sockets will be created, the IGMP socket can also receive IGMP multicast control packets from the kernel through configuration (cache_miss, process_whole_packet (PIM-DM does not need to be parsed )).


3. After enabling the PIM-DM on the interface, the protocol interface will first conduct Dr election to maintain the neighbor routing information.


4. Run stage, when the PIM-DM routing interface receives multicast information, the kernel will find the MFC table items, if the MFC table items exist in the multicast forwarding table, the multicast packets are forwarded according to the forwarding rules in the forwarding table. If the multicast forwarding table does not exist in the MFC table, the kernel triggers the cache_miss message to be sent to the PIM-DM protocol through the IGMP socket. After the cache_miss message is obtained by the protocol, create the (S, g) Table item, maintain the exit and entry, and send it to the kernel MFC. Then, the multicast packets are forwarded according to the MFC forwarding rules.


5. Maintenance of multicast forwarding tables. When the PIM-DM creates a (S, g) Forwarding Table, the entry is the interface that receives the packet, and the exit is all the PIM-DM interfaces except the interface. In this way, once you receive the multicast packet, the PIM-DM router will forward the multicast packet from all the PIM-DM interfaces except the interface. This process is how sprase mode (Sparse Mode) works.


6. In the process of pruning, when the terminal PIM-DM route receives the packet from the source end, it also creates the corresponding (S, g) forwarding table. Check whether the multicast receiver exists. If there are still no recipients after the pruning timer expires, the DM router will send a pruned pruning packet to the multicast entry to notify the uplink route that the routing interface does not need to receive the multicast information. In this way, the uplink route will remove the pruned interface from the exit list of the (S, g) Forwarding Table and temporarily add it to the pruned interface list.


7. Add or quit the receiver. When the terminal router receives the IGMP report message, it adds the corresponding interface to its (S, g) table entry-out interface and sends the alert packet to the multicast entry, advertise the uplink route to add itself to the multicast receiver. When the terminal router receives the IGMP leave message, it removes the corresponding exit interface from the (S, g) Table and repeats the pruning process in Step 6.



All in all: the way PIM-DM works, one of the following context conversations can be summarized.

PC 1 ---------- router A ---------- router B ------- SRC

|

PC 2 ------------ router C


SRC: I am sending the group broadcasting text. Let's take a look.

Router B: Router A, router C. Whether you want this multicast or not, I will send it to you first. Don't talk to me any more (sparse, diffusion mechanism)

Router A: Does anyone want this multicast (IGMP query )? No one returns for half a day (the pruning timer expires ). Forget it. I first record the multicast (create (S, g) Forwarding Table), and I will regularly ask if anyone wants it. But you don't need to send it to me (pruned pruning) for the moment ).

Router B: OK. I will not forward the multicast information to you (route ports associated with router A (S, g) and add it to the pruning interface list ).

Router C: Does anyone want this multicast? (IGMP query)

PC 2: Big Brother, I want. (IGMP Report)

Router C: I will first record (create (S, g) the forwarding table), and then I will receive the group broadcast, and I will send you a packet (Multicast forwarding ). Tell me if you don't want.

PC 1: I depend on it, so do I. (IGMP Report)

Router A: Router B someone on my side wants this multicast. Please send me a copy (alert ).

Router B: OK. I will send you a copy of the multicast later. (Add the router port associated with router A to the exit of (S, g ).

PC 1: It seems useless... Boss, I don't want it anymore. Don't send it to me.

Router A: Nima, are you playing with me? No. Router B no one on my side wants this multicast, so I don't have to send it again (pruned pruning ).

Router B: OK. (Remove the router port associated with router A from the exit of (S, G) and add it to the list of pruning interfaces)







PIM-DM protocol kernel trigger mechanism and Protocol operation mechanism record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.