Configuring PIM on MikroTik RouterOS

In this LAB, I am going to make R1 to be the RP. Then I will see if the VLC client will receive the multicast traffic from the VLC streaming server.

All IP addresses are set as per the graph on the routers and on the PC. That’s the only configuration that I have now.

Remember to add the route on the VLC Streaming server as we have done in the previous LAB. This can be done as the following:

[mepr-show rules=”319″ unauth=”message”]

Now we go to R1 and R2. Remember, for multicast to work we should have Unicast routing. For example, if we look now on R1 routing table, he doesn’t know how to reach the network 192.168.2.0/24 where the VLC client is:

So how come R1 will be able to send the multicast traffic to the receiver if he doesn’t know how to reach it. For this reason, I need to enable a routing protocol. I will use OSPF in this LAB, but you are free to use RIP or even static route if you want – the most important thing is to have the route working.

To make it easy, I will enable the OSPF on R1 and R2 for all networks as the following:

Now that I have configured OSPF on both R1 and R2, let’s see if they have learned the routes of each other. Will start from R1:

Indeed, R1 has learned from OSPF about the remote network which is 192.168.2.0/24 where the VLC client host is connected.

Let’s see now what R2 has learned from OSPF:

Also, we see that R2 has learned about the network where the VLC server is connected to.

That means that both routers know about all networks’ segment whether from Connected or OSPF.

Let’s start now configuring PIM on R1 and we have to make it as RP:

As we have done previously, we need to add the interfaces with PIM and IGMP protocols. The result will be as the following:

Now I need to say that R1 is going to be the RP. Let me show you how to do it:

On address, you can choose any of R1 physical IP. You can also use a virtual IP that you set on a loopback interface (on MikroTik it is a bridge interface) but then you need to advertise that IP in OSPF. In my case, I have chosen to take the IP of 192.168.12.1. Also on the group you have to put the multicast group where you want to send the multicast traffic to which is 239.1.2.3 and you click ok.

That’s all what you need to do on R1. Same steps you need to repeat on R2 as the following:

The result will be as the following:

Now you should say on R2 where the RP is. This can be done similar to what has been done on R1 as the following:

Now that PIM is enabled on both routers, they will send to each other hello packets. The hello packets are sent on MikroTik router every 30 second by default as you can see here:

Doing so, the 2 routers will form PIM neighborship because they have received the hello packets of each other. To check if they have formed neighborship, we see can that here on R1:

You see that R1 is seeing R2 as a PIM neighbor.

Same if we look from R2:

Also R2 sees R1 as a PIM neighbor.

Last thing to check before we do our test to see if the Multicast is going to work, let’s check the MRIB which is Multicast Route Information Based. The MRIB is nothing more than the Multicast Routing table.

If we look to R1, we see the following:

And on R2, we see the following:

So far so good, let’s run the multicast on VLC server as usual then I will open it on the VLC player at the client side.

Here we go, it is running without any issue. What happened is that the receiver PC has sent to R2 an IGMP membership report, and in turn R2 has sent to the RP a PIM join who in his turn has started flowing the multicast traffic to R2 and from R2 to the PC. Excellent, that’s really working perfectly without any issue.

While the multicast streaming is open, I will go to R2 and check the traffic on the interfaces Ether1 and Ether2:

You see, R2 is receiving the multicast traffic on Ether1 which is connected to the RP, and it is sending the multicast traffic via Ether2 to the PC.

To be sure that this is a multicast traffic, I will go inside each of the interfaces. Let’s go to the statistics of Ether1 first:

I can see clearly that the Rx Multicast is increasing on Ether1.

Let’s check now the Tx Multicast on Ether2:

Also, I see Tx Multicast is increasing on Ether2. That’s really great and our multicast is working with PIM.

That’s all what you need to know about PIM, see you in the upcoming chapter.

[/mepr-show]

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Please Login to Reply or add a comment!

About