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 0.0.0.0 255.255.255.255 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.

Image

Configuration

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 224.0.1.39 and 224.0.1.40 which is done using the following command.
ip pim autorp listener
Mapping agents hear about RPs via the 224.0.1.39 multicast group and send RP-to-group mappings in a discovery statement via 224.0.1.40.
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://@230.0.0.230:5004 (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 230.0.0.230 in the list which means host 192.168.10.2 (Windows XP) wants to listen to stream on group 230.0.0.230.

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 230.0.0.230 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 230.0.0.230 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

Image

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

Image

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 (*, 230.0.0.230) 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 1.1.2.1 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 1.1.2.1 command.

Image

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 (230.0.0.230). 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.

Image

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

Image

When (192.168.20.2, 230.0.0.230) 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).

Image

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 192.168.20.2. It sends a join message via R3 to R1 for (192.168.20.2,230.0.0.230). R5 also sends a prune to RP via R6 for (192.168.20.2,230.0.0.230) 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.

Image

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

Image

 

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.

Advertisements

27 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 230.0.0.230 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=230.0.0.230,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.
    Thanks,

    • 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?

    Thanks!!

    • 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 230.0.0.230
    Group 230.0.0.230 not found

    MCast_Gateway#sh ip mroute 230.0.0.230
    Group 230.0.0.230 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
    239.255.255.250 Ethernet1/2 01:36:53 00:02:17 172.16.1.253
    224.0.1.40 Loopback1 01:36:55 00:02:11 1.1.1.1

    and so R5:

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

    Looks like I getting something from Virtualbox interface ?

    Thanks is advanced.

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s