Multicasting with GNS3 and Virtualbox

There were many times during my CCIE Lab preparation that I wanted to have an actual Multicast server to lab up multicasting but I had always been left with ping to test and troubleshoot multicasting. There were 2 problems to it. The first is that it is a dull and boring multicast source which can be easily switched from one router to the other which if you think, is not a good thing because multicast sources are servers which remain steady in one place. When you shift your multicast source, clarity is lost about where the source is and where the destinations could be. The second is that a receiver is simulated using an IGMP join group which again is a simulation and not an actual receiver. It could be useful in testing but not perfect. With the release of GNS3 with Virtualbox, we can simulate the whole Internet over it, if we wished (and obviously if we had resources for it). By using GNS3 and Virtualbox, we are going to send Multicast Traffic from multicast source to any multicast receiver who intends to listen to it. In this blog, we will see how to send and receive actual multicast traffic through a routed network. I could have just put a multicast source and receiver on the same router to show that multicasting works on GNS3 and Virtualbox but it wouldn’t help anyone of us gaining knowledge. So I decided to run multicasting on a 6 Router topology so that we could run multicast routing, pim sparse mode and maybe look into some issues which multicasting can give us.

Minimum Requirements

A fast PC with i7 processor and sufficient ram to run 6 routers and 2 Virtualbox guests.
Virtualbox with 2 graphical OSes having VLC installed. I have used Win XP and Ubuntu Studio
GNS3 Virtualbox Edition

The Setup

The topology consists of 6 7200s as represented in the diagram. Cisco 7200 has been used as for some reason 3700 was losing connectivity as soon as multicast load would come. The ip addressing of the links is 1.1.x.x/24 where the 3rd octet is the router number combination of the link and the 4th octet is the router number. The Loopbacks have been numbered as 1.1.x.1/32 where the 3rd octet is the router number. OSPF is run on all links of all routers using network area 0 command. I am using only one interface on the virtualbox host for connecting it with the GNS3. If you are using a NAT interface simultaneously, the reachability will not be complete as then both interfaces will have default route, so shutdown the NAT interface. I am using Ubuntu Studio as Multicast source and it is connected to R1. Windows XP is used as Multicast receiver (I have tried vice versa but Ubuntu is having problem in receiving multicast stream) and is connected to R5. R2 is the pim rp and it is advertised using Auto RP. R4 is the mapping Agent for the rp.



I will not cover OSPF configuration as it is pretty straightforward. We will begin by enabling multicast routing on all routers
ip multicast-routing
This enables IGMP on all interfaces. Since we are using PIM Sparse mode, we will enable it on all interfaces.
Ip pim sparse-mode
Since we are running PIM Sparse mode, we require a Rendezvous Point (RP). We will announce this RP using Auto RP. We will configure Auto RP on R2 with loopback100 as the interface.
Ip pim send-rp-announce lo100 scope 15
int lo100
ip pim sparse-mode
The command makes R2 the RP with loopback 100 as the source and with maximum hop reachability of 15 (TTL perimeter). 2 important things to note, one is that the loopback100 interface ip address must be reachable via IGP and second is that loopback100 interface must have PIM enabled.
Now we will configure R4 as the Mapping Agent
ip pim send-rp-discovery lo100 scope 15
This command advertises loopback100 ip address as the mapping agent for the RP. Both requirements must be met which has been mentioned for Auto RP here as well.
Since we are using sparse-mode, the non connected routers will not be able to listen to RP and MA announcements. For that we will have to make these routers run PIM dense mode for and which is done using the following command.
ip pim autorp listener
Mapping agents hear about RPs via the multicast group and send RP-to-group mappings in a discovery statement via
Before starting the multicast source or receiver, ensure that you have unicast reachability to each other and the Auto RP loopbacks. Now that our Unicast and Multicast network is up and running, we will turn our attention to the Multicast end points. We will begin with a multicast receiver first to see how it works.

Configuring Multicast Receiver

Start VLC on Windows XP and Choose Media/Open Network Stream. In address, enter rtp://@ (I am choosing to receive on this address and port) and Click “Play”. Now when you do a show ip igmp groups on R5, you will get in the list which means host (Windows XP) wants to listen to stream on group

Configuring Multicast Source

We will start the multicast source by starting VLC on Ubuntu Studio and In the Media menu, choose “Stream”. In the Open Media dialog file tab, click “add” and choose the file you want to stream and click “Open”. At the bottom, click the “Stream” button. This opens the “Stream Output” dialog showing the source file you have chosen. Click Next to set destination. In “Destinations”, choose “RTP /MPEG Transport Stream” and click the “Add” button. In the “Address” box, enter the multicast address and set the port at 5004. The click Next for “Option Setup” and select “Stream all elementary streams” and be sure to increase the TTL as our topology has more than 6 hops and then click stream. If you do a show ip mroute on R1, you should see the group. Go to your windows XP VLC window and you should see a video stream.

The following image shows VLC streaming on Ubuntu Studio


The following image shows VLC getting the video stream on windows XP.


Note: It will be better to start with a video file with less resolution because GNS3 interfaces are simulated and not actual. Their bandwidth is very less as compared to actual interface bandwidth. If you wish, you can increase the resolution and see but it might pixelate but you will get the stream nonetheless. Also, click on the loop button on VLC which will make it a continuous stream.

Multicast Traffic Flow

As you might be knowing that in PIM Sparse mode, the Root path tree works only for sometime and switches to Shortest Path tree. I have purposefully placed the RP such that it is sub optimal. Later on, the traffic from Source will switch over through best path bypassing RP. This graphical view will show us how that goes about.

As soon as you start the VLC on windows XP, it will request for multicast to the router. Since R5 does not have the source, it will forward the request to R6, R4 and then R2 which is the RP. Every Router it traverses, it makes a (*, entry as it does not know the source. Now, you could be wondering why the request only went through R5>R6>R4>R2 and not through R5>R3>R4>R2 or R5>R3>R1>R2 as all the links are equal costs and the path to RP i.e. R2 is redundant. The reason RPF check is passing only through the first path is because since both links have equal costs the next thing to be checked is neighbor ip address and R6 has a higher ip address as compared to R3. The RPF can be checked by show ip rpf command.


When you start the Multicast source on Ubuntu Studio, the Multicast traffic goes to R1. Upon receiving the first multicast packet from the source, R1 consults the RP mapping cache and finds the RP address for the group ( R1 then encapsulates the data in a Register message and sends it as a unicast directly to the RP. The RP already has a shared tree state for the group and de-encapsulates the data from the Register and forwards it down the shared tree.


Also, RP reacts with the (, Join message towards the source.


When (, Join reaches R1, the shortest-path tree (SPT) is built between the RP and R1, and the multicast packets arrive natively at the RP. Now 2 streams are coming from R1 to RP, one is through unicast and one is through multicast. The RP sends a Register-Stop message to instruct R1 to stop registering (i.e. sending stream as unicast).


R5 after receiving first multicast traffic via RP knows the source address of multicast traffic and decides to switch to SPT based on IGP reachability of source It sends a join message via R3 to R1 for (, R5 also sends a prune to RP via R6 for (, telling it stop the stream via RP. The RP forwards the prune to R1 and thus multicast traffic is stopped via RP and it goes directly to receiver via R3.


The following Diagram shows the path of the multicast traffic after switching to SPT.



Router Configurations

You can find the configurations of the 6 routers here.

I hope my post has been helpful in your life but the only guide which can help you in the hereafter is the Qur’an. You can download the English translation of the Qur’an here.

31 thoughts on “Multicasting with GNS3 and Virtualbox

  1. Hi
    I have configured the lab exactly as its shown in topology but i am unable to see the igmp group on router 1, what could be the reason, i am also having problem to change the TTL value in VLC player, either the newer version of VLC doesn’t allow to change the TTL or am I missing something, would be really thankful if you can help,

    • I cannot suggest anything without seeing the config and the show commands. The new version of VLC does not have a TTL option in GUI but you can add it by editing the last screen “option setup” and editing Generated stream output string by adding ,ttl=10 or whatever value you want for ttl rtp{dst=,port=5004,mux=ts,ttl=10}
      If still you are not able to get the stream, I will mail you the configs.

      • Thank you very much for reply, there was nothing wrong with configuration it was only TTL value of VLC, everything is working fine, I even tried the sparse-dense mode and everything is working perfect, thanks for post its really helpful.

  2. Hello Samir, Can you please share the virtualbox version you used? I’ve been trying all day long to build a lab but the source multicast server doesn’t send the IGMP membership report to the first hop router. I’m using 4.3.15 which is not an stable version due to incompatibilities with my antivirus and I think that might be the culprit.

    • I don’t think that the issue is the Vbox. The first thing you need to check is that the ttl is more than 1 as the traffic has to traverse several hops. Another user faced a similar issue as yours and increasing ttl rectified it. The other way you can check whether traffic is generated or not is by running wireshark packet capture on your multicast server to see whether it is generating traffic or not and with what ttl.

  3. Hi
    Could you please share all the config with me too? Thanks in Advance.
    I need to study Multicast and therefore it looks as a good case to me.

  4. Hello I thought “ip pim autorp listener” in R1 and R5, but I don’t see it in the config. What I did is I relocate the source and receiver to R3 and R6 and it’s working. Any idea?


    • I must have missed “ip pim autorp listener” in the config. They have to be there on all routers. If you relocate your source and destination on R3 and R6, you will not require the command as your source and destination are directly connected to mapping Agent.

  5. Hello,

    Nice material.

    After followed the instructions I am still not able to get my lab running properly.

    R1 and R5 are not part of gourp:

    R5#sh ip mroute
    Group not found

    MCast_Gateway#sh ip mroute
    Group not found

    They are part of another group:
    MCast_Gateway#sh ip igmp g
    IGMP Connected Group Membership
    Group Address Interface Uptime Expires Last Reporter Group Accounted Ethernet1/2 01:36:53 00:02:17 Loopback1 01:36:55 00:02:11

    and so R5:

    R5#sh ip igmp g
    IGMP Connected Group Membership
    Group Address Interface Uptime Expires Last Reporter Group Accounted Ethernet1/3 01:19:24 00:02:42 Loopback1 01:36:29 00:02:33

    Looks like I getting something from Virtualbox interface ?

    Thanks is advanced.

  6. Thanks for Great Turorial. I did the step but the streaming doesn’t seem to work. There is no mroute to Group on R1.
    Q: ON which router should be add this command: ip pim autorp listener?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.