Here is a small multicast lab with one source in Qemu, one router and one receiver (VLC). This lab has been tested on Windows XP and can easily be adapted to make bigger multicast labs or to run on other operating systems. You need GNS3 installed with an IOS c3640 image recorded and VLC.
Start by downloading the lab (about 75 MB) and unzip it.
Add a loopback interface
Create a loopback interface in order to communicate with your PC from GNS3.
- Create new network connection, use “add hardware” menu on the Control Panel to do this.
- Let the add hardware wizard runs its course and click on “Yes , I have connected the hardware”.
- Scroll to the bottom of the list and choose “add a new hardware device”.
- Install the hardware manually.
- Select Network Adaptor.
- Select Microsoft and choose MS Loopback Adaptor and finish installation.
- Under “Network Connections”, a new icon is created besides the usual network cards.
- Rename this Loopback – GNS3.
- Configure the PC loopback interface with an IP address: 100.100.100.2, netmask: 255.555.255.0 and gateway: 100.100.100.1
- Reboot.
Fix the topology file to add your loopback
In Windows: Start -> All Programs -> GNS3, click on Network device list. You should see something similar to this:
NIO_gen_eth:\Device\NPF_{FD2911D5-CAC7-4382-813B-4E4997876429}
Name : Loopback – GNS3
Desciption: MS LoopBack Driver
Edit Multicast.net with Notepad and replace nio_gen_eth:\device\npf_{03211acb-57e8-4c85-8dd4-f367c6024bfc} by the one previously found ( i.e NIO_gen_eth:\Device\NPF_{FD2911D5-CAC7-4382-813B-4E4997876429}), then save the file.
Add multicast routes
- In cmd.exe, remove any current multicast route with the following command: route delete 224.0.0.0 mask 240.0.0.0 (the route may still shows up when typing route print, if this is the case you can ignore it).
- Add a multicast route to the virtual router: route add 224.0.0.0 mask 240.0.0.0 100.100.100.1
- Add a route to the virtual host network (multicast source) via the virtual router: route add 192.168.100.0 mask 255.255.255.0 100.100.100.1
Start the multicast lab
- Launch GNS3 and load Multicast.net
- Start all devices and wait for them to be fully started.
- In cmd.exe, ping 100.100.100.1 (virtual router). Do the same for 192.168.100.1 (Qemu virtual host).
- On the Qemu virtual host. Start Aterm and type “sh start.sh” in the console. This will start VLC which multicast a video stream to 224.1.1.1. You can select to loop the video, so you won’t have to restart it.
Test with VLC
- Now test that you receive the multicast steam with VLC on your PC.
- In VLC, go to Media -> Open Stream Network, type udp://@224.1.1.1:1234 in the network URL box, then click on Play. VLC will then send an IGMP request to the virtual router saying it wants to receive the 224.1.1.1 multicast stream. After a few seconds you should see the video!
Debugging
To check that VLC sends IGMP request you can use Wireshark to capture traffic on the Loopback adapter. Alternatively you can issue “en” to go to enable mode and then “debug ip igmp 224.1.1.1” in the router console.
You should see something like this if the router receives IGMP request. Here v2 means that IGMP version 2 is used. 100.100.100.2 is the loopback adapter (your PC).
Received v2 Report on FastEthernet0/1 from 100.100.100.2 for 224.1.1.1 WAVL Insert group: 224.1.1.1 interface: FastEthernet0/1 Successful Switching to EXCLUDE mode for 224.1.1.1 on FastEthernet0/1 Updating EXCLUDE group timer for 224.1.1.1 MRT Add/Update FastEthernet0/1 for (*,224.1.1.1) by 0 IGMP(0): Send v2 general Query on FastEthernet0/1 IGMP(0): Received v2 Report on FastEthernet0/1 from 100.100.100.2 for 224.1.1.1 IGMP(0): Received Group record for group 224.1.1.1, mode 2 from 100.100.100.2 for 0 sources
A clearer way but less detailed way to check if the virtual router has received an IGMP request is to use this command:
R1# show ip igmp groups
This means that the request is recorded on the router:
Group Address Interface Uptime Expires Last Reporter Group Accounted 224.1.1.1 FastEthernet0/1 00:05:14 00:02:17 100.100.100.2
If the router receives an IGMP request for 224.1.1.1 on FastEthernet0/1 then it will know it must forward the steam to FastEthernet0/1. You can check this with the following command:
R1# show ip mroute
You should see something like this:
(192.168.100.1, 224.1.1.1), 00:02:49/00:02:50, flags: T Incoming interface: FastEthernet0/0, RPF nbr 0.0.0.0 Outgoing interface list: FastEthernet0/1, Forward/Sparse-Dense, 00:00:32/00:00:00
It means a 224.1.1.1 multicast stream is being received from 192.168.100.1. Look at outgoing interface list, if FastEthernet0/1 is present then the router is forwarding the multicast stream to that interface.





Word of warning – if you’re trying to expand this example to larger networks the VLC server TTL variable is set to 2 and so multicast will not work over multiple routers.
To fix edit the start.sh file and change TTL to a larger value (e.g. 20)
Took me ages to figure out why my network wasn’t working!